<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE GADTs #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE MultiWayIf #-}</span><span>
</span><span id="line-3"></span><span>
</span><span id="line-4"></span><span class="hs-pragma">{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-}</span><span>
</span><span id="line-5"></span><span>
</span><span id="line-6"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-7"></span><span class="hs-comment">--</span><span>
</span><span id="line-8"></span><span class="hs-comment">-- Debugging data</span><span>
</span><span id="line-9"></span><span class="hs-comment">--</span><span>
</span><span id="line-10"></span><span class="hs-comment">-- Association of debug data on the Cmm level, with methods to encode it in</span><span>
</span><span id="line-11"></span><span class="hs-comment">-- event log format for later inclusion in profiling event logs.</span><span>
</span><span id="line-12"></span><span class="hs-comment">--</span><span>
</span><span id="line-13"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-14"></span><span>
</span><span id="line-15"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.Cmm.DebugBlock</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-16"></span><span>
</span><span id="line-17"></span><span>  </span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#DebugBlock"><span class="hs-identifier">DebugBlock</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-18"></span><span>  </span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#cmmDebugGen"><span class="hs-identifier">cmmDebugGen</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-19"></span><span>  </span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#cmmDebugLabels"><span class="hs-identifier">cmmDebugLabels</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-20"></span><span>  </span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#cmmDebugLink"><span class="hs-identifier">cmmDebugLink</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-21"></span><span>  </span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#debugToMap"><span class="hs-identifier">debugToMap</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-22"></span><span>
</span><span id="line-23"></span><span>  </span><span class="annot"><span class="hs-comment">-- * Unwinding information</span></span><span>
</span><span id="line-24"></span><span>  </span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#UnwindTable"><span class="hs-identifier">UnwindTable</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#UnwindPoint"><span class="hs-identifier">UnwindPoint</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-25"></span><span>  </span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#UnwindExpr"><span class="hs-identifier">UnwindExpr</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#toUnwindExpr"><span class="hs-identifier">toUnwindExpr</span></a></span><span>
</span><span id="line-26"></span><span>  </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-27"></span><span>
</span><span id="line-28"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Prelude.html"><span class="hs-identifier">GHC.Prelude</span></a></span><span>
</span><span id="line-29"></span><span>
</span><span id="line-30"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#"><span class="hs-identifier">GHC.Platform</span></a></span><span>
</span><span id="line-31"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Cmm.BlockId.html"><span class="hs-identifier">GHC.Cmm.BlockId</span></a></span><span>
</span><span id="line-32"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Cmm.CLabel.html"><span class="hs-identifier">GHC.Cmm.CLabel</span></a></span><span>
</span><span id="line-33"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Cmm.html"><span class="hs-identifier">GHC.Cmm</span></a></span><span>
</span><span id="line-34"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Cmm.Utils.html"><span class="hs-identifier">GHC.Cmm.Utils</span></a></span><span>
</span><span id="line-35"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.html"><span class="hs-identifier">GHC.Core</span></a></span><span>
</span><span id="line-36"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Data.FastString.html"><span class="hs-identifier">GHC.Data.FastString</span></a></span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Data.FastString.html#nilFS"><span class="hs-identifier">nilFS</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Data.FastString.html#mkFastString"><span class="hs-identifier">mkFastString</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-37"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Unit.Module.html"><span class="hs-identifier">GHC.Unit.Module</span></a></span><span>
</span><span id="line-38"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html"><span class="hs-identifier">GHC.Utils.Outputable</span></a></span><span>
</span><span id="line-39"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Cmm.Ppr.Expr.html"><span class="hs-identifier">GHC.Cmm.Ppr.Expr</span></a></span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Cmm.Ppr.Expr.html#pprExpr"><span class="hs-identifier">pprExpr</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-40"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html"><span class="hs-identifier">GHC.Types.SrcLoc</span></a></span><span>
</span><span id="line-41"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Misc.html"><span class="hs-identifier">GHC.Utils.Misc</span></a></span><span>      </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Utils.Misc.html#seqList"><span class="hs-identifier">seqList</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-42"></span><span>
</span><span id="line-43"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html"><span class="hs-identifier">GHC.Cmm.Dataflow.Block</span></a></span><span>
</span><span id="line-44"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Collections.html"><span class="hs-identifier">GHC.Cmm.Dataflow.Collections</span></a></span><span>
</span><span id="line-45"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html"><span class="hs-identifier">GHC.Cmm.Dataflow.Graph</span></a></span><span>
</span><span id="line-46"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Label.html"><span class="hs-identifier">GHC.Cmm.Dataflow.Label</span></a></span><span>
</span><span id="line-47"></span><span>
</span><span id="line-48"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Maybe.html#"><span class="hs-identifier">Data.Maybe</span></a></span><span>
</span><span id="line-49"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.List.html#"><span class="hs-identifier">Data.List</span></a></span><span>     </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="../../base/src/Data.Foldable.html#minimumBy"><span class="hs-identifier">minimumBy</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/Data.OldList.html#nubBy"><span class="hs-identifier">nubBy</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-50"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Ord.html#"><span class="hs-identifier">Data.Ord</span></a></span><span>      </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="../../base/src/Data.Ord.html#comparing"><span class="hs-identifier">comparing</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-51"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../containers/src/Data.Map.html#"><span class="hs-identifier">Data.Map</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Map</span></span><span>
</span><span id="line-52"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Either.html#"><span class="hs-identifier">Data.Either</span></a></span><span>   </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="../../base/src/Data.Either.html#partitionEithers"><span class="hs-identifier">partitionEithers</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-53"></span><span>
</span><span id="line-54"></span><span class="hs-comment">-- | Debug information about a block of code. Ticks scope over nested</span><span>
</span><span id="line-55"></span><span class="hs-comment">-- blocks.</span><span>
</span><span id="line-56"></span><span class="hs-keyword">data</span><span> </span><span id="DebugBlock"><span class="annot"><a href="GHC.Cmm.DebugBlock.html#DebugBlock"><span class="hs-identifier hs-var">DebugBlock</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-57"></span><span>  </span><span id="DebugBlock"><span class="annot"><a href="GHC.Cmm.DebugBlock.html#DebugBlock"><span class="hs-identifier hs-var">DebugBlock</span></a></span></span><span>
</span><span id="line-58"></span><span>  </span><span class="hs-special">{</span><span> </span><span id="dblProcedure"><span class="annot"><span class="annottext">DebugBlock -&gt; Label
</span><a href="GHC.Cmm.DebugBlock.html#dblProcedure"><span class="hs-identifier hs-var hs-var">dblProcedure</span></a></span></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="GHC.Cmm.Dataflow.Label.html#Label"><span class="hs-identifier hs-type">Label</span></a></span><span>        </span><span class="hs-comment">-- ^ Entry label of containing proc</span><span>
</span><span id="line-59"></span><span>  </span><span class="hs-special">,</span><span> </span><span id="dblLabel"><span class="annot"><span class="annottext">DebugBlock -&gt; Label
</span><a href="GHC.Cmm.DebugBlock.html#dblLabel"><span class="hs-identifier hs-var hs-var">dblLabel</span></a></span></span><span>      </span><span class="hs-glyph">::</span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="GHC.Cmm.Dataflow.Label.html#Label"><span class="hs-identifier hs-type">Label</span></a></span><span>        </span><span class="hs-comment">-- ^ Hoopl label</span><span>
</span><span id="line-60"></span><span>  </span><span class="hs-special">,</span><span> </span><span id="dblCLabel"><span class="annot"><span class="annottext">DebugBlock -&gt; CLabel
</span><a href="GHC.Cmm.DebugBlock.html#dblCLabel"><span class="hs-identifier hs-var hs-var">dblCLabel</span></a></span></span><span>     </span><span class="hs-glyph">::</span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="GHC.Cmm.CLabel.html#CLabel"><span class="hs-identifier hs-type">CLabel</span></a></span><span>       </span><span class="hs-comment">-- ^ Output label</span><span>
</span><span id="line-61"></span><span>  </span><span class="hs-special">,</span><span> </span><span id="dblHasInfoTbl"><span class="annot"><span class="annottext">DebugBlock -&gt; Bool
</span><a href="GHC.Cmm.DebugBlock.html#dblHasInfoTbl"><span class="hs-identifier hs-var hs-var">dblHasInfoTbl</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-glyph">!</span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>         </span><span class="hs-comment">-- ^ Has an info table?</span><span>
</span><span id="line-62"></span><span>  </span><span class="hs-special">,</span><span> </span><span id="dblParent"><span class="annot"><span class="annottext">DebugBlock -&gt; Maybe DebugBlock
</span><a href="GHC.Cmm.DebugBlock.html#dblParent"><span class="hs-identifier hs-var hs-var">dblParent</span></a></span></span><span>     </span><span class="hs-glyph">::</span><span> </span><span class="hs-glyph">!</span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#DebugBlock"><span class="hs-identifier hs-type">DebugBlock</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-63"></span><span>    </span><span class="hs-comment">-- ^ The parent of this proc. See Note [Splitting DebugBlocks]</span><span>
</span><span id="line-64"></span><span>  </span><span class="hs-special">,</span><span> </span><span id="dblTicks"><span class="annot"><span class="annottext">DebugBlock -&gt; [Tickish ()]
</span><a href="GHC.Cmm.DebugBlock.html#dblTicks"><span class="hs-identifier hs-var hs-var">dblTicks</span></a></span></span><span>      </span><span class="hs-glyph">::</span><span> </span><span class="hs-glyph">!</span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.Node.html#CmmTickish"><span class="hs-identifier hs-type">CmmTickish</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-comment">-- ^ Ticks defined in this block</span><span>
</span><span id="line-65"></span><span>  </span><span class="hs-special">,</span><span> </span><span id="dblSourceTick"><span class="annot"><span class="annottext">DebugBlock -&gt; Maybe (Tickish ())
</span><a href="GHC.Cmm.DebugBlock.html#dblSourceTick"><span class="hs-identifier hs-var hs-var">dblSourceTick</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-glyph">!</span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmTickish"><span class="hs-identifier hs-type">CmmTickish</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-comment">-- ^ Best source tick covering block</span><span>
</span><span id="line-66"></span><span>  </span><span class="hs-special">,</span><span> </span><span id="dblPosition"><span class="annot"><span class="annottext">DebugBlock -&gt; Maybe Int
</span><a href="GHC.Cmm.DebugBlock.html#dblPosition"><span class="hs-identifier hs-var hs-var">dblPosition</span></a></span></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="hs-glyph">!</span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span class="hs-special">)</span><span>  </span><span class="hs-comment">-- ^ Output position relative to</span><span>
</span><span id="line-67"></span><span>                                   </span><span class="hs-comment">-- other blocks. @Nothing@ means</span><span>
</span><span id="line-68"></span><span>                                   </span><span class="hs-comment">-- the block was optimized out</span><span>
</span><span id="line-69"></span><span>  </span><span class="hs-special">,</span><span> </span><span id="dblUnwind"><span class="annot"><span class="annottext">DebugBlock -&gt; [UnwindPoint]
</span><a href="GHC.Cmm.DebugBlock.html#dblUnwind"><span class="hs-identifier hs-var hs-var">dblUnwind</span></a></span></span><span>     </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#UnwindPoint"><span class="hs-identifier hs-type">UnwindPoint</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-70"></span><span>  </span><span class="hs-special">,</span><span> </span><span id="dblBlocks"><span class="annot"><span class="annottext">DebugBlock -&gt; [DebugBlock]
</span><a href="GHC.Cmm.DebugBlock.html#dblBlocks"><span class="hs-identifier hs-var hs-var">dblBlocks</span></a></span></span><span>     </span><span class="hs-glyph">::</span><span> </span><span class="hs-glyph">!</span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#DebugBlock"><span class="hs-identifier hs-type">DebugBlock</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-comment">-- ^ Nested blocks</span><span>
</span><span id="line-71"></span><span>  </span><span class="hs-special">}</span><span>
</span><span id="line-72"></span><span>
</span><span id="line-73"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621681029200"><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#DebugBlock"><span class="hs-identifier hs-type">DebugBlock</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-74"></span><span>  </span><span id="local-6989586621681029184"><span class="annot"><span class="annottext">ppr :: DebugBlock -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var hs-var hs-var hs-var">ppr</span></a></span></span><span> </span><span id="local-6989586621681029182"><span class="annot"><span class="annottext">DebugBlock
</span><a href="#local-6989586621681029182"><span class="hs-identifier hs-var">blk</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-keyword">if</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">DebugBlock -&gt; Label
</span><a href="GHC.Cmm.DebugBlock.html#dblProcedure"><span class="hs-identifier hs-var hs-var">dblProcedure</span></a></span><span> </span><span class="annot"><span class="annottext">DebugBlock
</span><a href="#local-6989586621681029182"><span class="hs-identifier hs-var">blk</span></a></span><span> </span><span class="annot"><span class="annottext">Label -&gt; Label -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">DebugBlock -&gt; Label
</span><a href="GHC.Cmm.DebugBlock.html#dblLabel"><span class="hs-identifier hs-var hs-var">dblLabel</span></a></span><span> </span><span class="annot"><span class="annottext">DebugBlock
</span><a href="#local-6989586621681029182"><span class="hs-identifier hs-var">blk</span></a></span><span>
</span><span id="line-75"></span><span>                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;proc&quot;</span></span><span>
</span><span id="line-76"></span><span>                </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">DebugBlock -&gt; Bool
</span><a href="GHC.Cmm.DebugBlock.html#dblHasInfoTbl"><span class="hs-identifier hs-var hs-var">dblHasInfoTbl</span></a></span><span> </span><span class="annot"><span class="annottext">DebugBlock
</span><a href="#local-6989586621681029182"><span class="hs-identifier hs-var">blk</span></a></span><span>
</span><span id="line-77"></span><span>                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;pp-blk&quot;</span></span><span>
</span><span id="line-78"></span><span>                </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-79"></span><span>                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;blk&quot;</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span>
</span><span id="line-80"></span><span>            </span><span class="annot"><span class="annottext">Label -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DebugBlock -&gt; Label
</span><a href="GHC.Cmm.DebugBlock.html#dblLabel"><span class="hs-identifier hs-var hs-var">dblLabel</span></a></span><span> </span><span class="annot"><span class="annottext">DebugBlock
</span><a href="#local-6989586621681029182"><span class="hs-identifier hs-var">blk</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#parens"><span class="hs-identifier hs-var">parens</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CLabel -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DebugBlock -&gt; CLabel
</span><a href="GHC.Cmm.DebugBlock.html#dblCLabel"><span class="hs-identifier hs-var hs-var">dblCLabel</span></a></span><span> </span><span class="annot"><span class="annottext">DebugBlock
</span><a href="#local-6989586621681029182"><span class="hs-identifier hs-var">blk</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span>
</span><span id="line-81"></span><span>            </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SDoc -&gt; (Tickish () -&gt; SDoc) -&gt; Maybe (Tickish ()) -&gt; SDoc
forall b a. b -&gt; (a -&gt; b) -&gt; Maybe a -&gt; b
</span><a href="../../base/src/Data.Maybe.html#maybe"><span class="hs-identifier hs-var">maybe</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#empty"><span class="hs-identifier hs-var">empty</span></a></span><span> </span><span class="annot"><span class="annottext">Tickish () -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DebugBlock -&gt; Maybe (Tickish ())
</span><a href="GHC.Cmm.DebugBlock.html#dblSourceTick"><span class="hs-identifier hs-var hs-var">dblSourceTick</span></a></span><span> </span><span class="annot"><span class="annottext">DebugBlock
</span><a href="#local-6989586621681029182"><span class="hs-identifier hs-var">blk</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span>
</span><span id="line-82"></span><span>            </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SDoc -&gt; (Int -&gt; SDoc) -&gt; Maybe Int -&gt; SDoc
forall b a. b -&gt; (a -&gt; b) -&gt; Maybe a -&gt; b
</span><a href="../../base/src/Data.Maybe.html#maybe"><span class="hs-identifier hs-var">maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;removed&quot;</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;pos &quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(SDoc -&gt; SDoc) -&gt; (Int -&gt; SDoc) -&gt; Int -&gt; SDoc
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-83"></span><span>                   </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DebugBlock -&gt; Maybe Int
</span><a href="GHC.Cmm.DebugBlock.html#dblPosition"><span class="hs-identifier hs-var hs-var">dblPosition</span></a></span><span> </span><span class="annot"><span class="annottext">DebugBlock
</span><a href="#local-6989586621681029182"><span class="hs-identifier hs-var">blk</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span>
</span><span id="line-84"></span><span>            </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[UnwindPoint] -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DebugBlock -&gt; [UnwindPoint]
</span><a href="GHC.Cmm.DebugBlock.html#dblUnwind"><span class="hs-identifier hs-var hs-var">dblUnwind</span></a></span><span> </span><span class="annot"><span class="annottext">DebugBlock
</span><a href="#local-6989586621681029182"><span class="hs-identifier hs-var">blk</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%2B%24"><span class="hs-operator hs-var">$+$</span></a></span><span>
</span><span id="line-85"></span><span>            </span><span class="hs-special">(</span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">[DebugBlock] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DebugBlock -&gt; [DebugBlock]
</span><a href="GHC.Cmm.DebugBlock.html#dblBlocks"><span class="hs-identifier hs-var hs-var">dblBlocks</span></a></span><span> </span><span class="annot"><span class="annottext">DebugBlock
</span><a href="#local-6989586621681029182"><span class="hs-identifier hs-var">blk</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#empty"><span class="hs-identifier hs-var">empty</span></a></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Int -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#nest"><span class="hs-identifier hs-var">nest</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">4</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[DebugBlock] -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DebugBlock -&gt; [DebugBlock]
</span><a href="GHC.Cmm.DebugBlock.html#dblBlocks"><span class="hs-identifier hs-var hs-var">dblBlocks</span></a></span><span> </span><span class="annot"><span class="annottext">DebugBlock
</span><a href="#local-6989586621681029182"><span class="hs-identifier hs-var">blk</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-86"></span><span>
</span><span id="line-87"></span><span class="hs-comment">-- | Intermediate data structure holding debug-relevant context information</span><span>
</span><span id="line-88"></span><span class="hs-comment">-- about a block.</span><span>
</span><span id="line-89"></span><span class="hs-keyword">type</span><span> </span><span id="BlockContext"><span class="annot"><a href="GHC.Cmm.DebugBlock.html#BlockContext"><span class="hs-identifier hs-var">BlockContext</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#CmmBlock"><span class="hs-identifier hs-type">CmmBlock</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.html#RawCmmDecl"><span class="hs-identifier hs-type">RawCmmDecl</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-90"></span><span>
</span><span id="line-91"></span><span class="hs-comment">-- | Extract debug data from a group of procedures. We will prefer</span><span>
</span><span id="line-92"></span><span class="hs-comment">-- source notes that come from the given module (presumably the module</span><span>
</span><span id="line-93"></span><span class="hs-comment">-- that we are currently compiling).</span><span>
</span><span id="line-94"></span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#cmmDebugGen"><span class="hs-identifier hs-type">cmmDebugGen</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Unit.Module.Location.html#ModLocation"><span class="hs-identifier hs-type">ModLocation</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.html#RawCmmGroup"><span class="hs-identifier hs-type">RawCmmGroup</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#DebugBlock"><span class="hs-identifier hs-type">DebugBlock</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-95"></span><span id="cmmDebugGen"><span class="annot"><span class="annottext">cmmDebugGen :: ModLocation -&gt; RawCmmGroup -&gt; [DebugBlock]
</span><a href="GHC.Cmm.DebugBlock.html#cmmDebugGen"><span class="hs-identifier hs-var hs-var">cmmDebugGen</span></a></span></span><span> </span><span id="local-6989586621681029170"><span class="annot"><span class="annottext">ModLocation
</span><a href="#local-6989586621681029170"><span class="hs-identifier hs-var">modLoc</span></a></span></span><span> </span><span id="local-6989586621681029169"><span class="annot"><span class="annottext">RawCmmGroup
</span><a href="#local-6989586621681029169"><span class="hs-identifier hs-var">decls</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(CmmTickScope -&gt; DebugBlock) -&gt; [CmmTickScope] -&gt; [DebugBlock]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Maybe (Tickish ()) -&gt; CmmTickScope -&gt; DebugBlock
</span><a href="#local-6989586621681029168"><span class="hs-identifier hs-var">blocksForScope</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe (Tickish ())
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[CmmTickScope]
</span><a href="#local-6989586621681029167"><span class="hs-identifier hs-var">topScopes</span></a></span><span>
</span><span id="line-96"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-97"></span><span>      </span><span class="annot"><a href="#local-6989586621681029166"><span class="hs-identifier hs-type">blockCtxs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../containers/src/Data.Map.Internal.html#Map"><span class="hs-identifier hs-type">Map.Map</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmTickScope"><span class="hs-identifier hs-type">CmmTickScope</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#BlockContext"><span class="hs-identifier hs-type">BlockContext</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-98"></span><span>      </span><span id="local-6989586621681029166"><span class="annot"><span class="annottext">blockCtxs :: Map CmmTickScope [BlockContext]
</span><a href="#local-6989586621681029166"><span class="hs-identifier hs-var hs-var">blockCtxs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RawCmmGroup -&gt; Map CmmTickScope [BlockContext]
</span><a href="GHC.Cmm.DebugBlock.html#blockContexts"><span class="hs-identifier hs-var">blockContexts</span></a></span><span> </span><span class="annot"><span class="annottext">RawCmmGroup
</span><a href="#local-6989586621681029169"><span class="hs-identifier hs-var">decls</span></a></span><span>
</span><span id="line-99"></span><span>
</span><span id="line-100"></span><span>      </span><span class="hs-comment">-- Analyse tick scope structure: Each one is either a top-level</span><span>
</span><span id="line-101"></span><span>      </span><span class="hs-comment">-- tick scope, or the child of another.</span><span>
</span><span id="line-102"></span><span>      </span><span class="hs-special">(</span><span id="local-6989586621681029167"><span class="annot"><span class="annottext">[CmmTickScope]
</span><a href="#local-6989586621681029167"><span class="hs-identifier hs-var">topScopes</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681029164"><span class="annot"><span class="annottext">[(CmmTickScope, CmmTickScope)]
</span><a href="#local-6989586621681029164"><span class="hs-identifier hs-var">childScopes</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-103"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Either CmmTickScope (CmmTickScope, CmmTickScope)]
-&gt; ([CmmTickScope], [(CmmTickScope, CmmTickScope)])
forall a b. [Either a b] -&gt; ([a], [b])
</span><a href="../../base/src/Data.Either.html#partitionEithers"><span class="hs-identifier hs-var">partitionEithers</span></a></span><span> </span><span class="annot"><span class="annottext">([Either CmmTickScope (CmmTickScope, CmmTickScope)]
 -&gt; ([CmmTickScope], [(CmmTickScope, CmmTickScope)]))
-&gt; [Either CmmTickScope (CmmTickScope, CmmTickScope)]
-&gt; ([CmmTickScope], [(CmmTickScope, CmmTickScope)])
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(CmmTickScope -&gt; Either CmmTickScope (CmmTickScope, CmmTickScope))
-&gt; [CmmTickScope]
-&gt; [Either CmmTickScope (CmmTickScope, CmmTickScope)]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621681029163"><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621681029163"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmTickScope
-&gt; CmmTickScope -&gt; Either CmmTickScope (CmmTickScope, CmmTickScope)
forall {t}. t -&gt; CmmTickScope -&gt; Either t (CmmTickScope, t)
</span><a href="#local-6989586621681029162"><span class="hs-identifier hs-var">findP</span></a></span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621681029163"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621681029163"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">([CmmTickScope]
 -&gt; [Either CmmTickScope (CmmTickScope, CmmTickScope)])
-&gt; [CmmTickScope]
-&gt; [Either CmmTickScope (CmmTickScope, CmmTickScope)]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Map CmmTickScope [BlockContext] -&gt; [CmmTickScope]
forall k a. Map k a -&gt; [k]
</span><a href="../../containers/src/Data.Map.Internal.html#keys"><span class="hs-identifier hs-var">Map.keys</span></a></span><span> </span><span class="annot"><span class="annottext">Map CmmTickScope [BlockContext]
</span><a href="#local-6989586621681029166"><span class="hs-identifier hs-var">blockCtxs</span></a></span><span>
</span><span id="line-104"></span><span>      </span><span id="local-6989586621681029162"><span class="annot"><span class="annottext">findP :: t -&gt; CmmTickScope -&gt; Either t (CmmTickScope, t)
</span><a href="#local-6989586621681029162"><span class="hs-identifier hs-var hs-var">findP</span></a></span></span><span> </span><span id="local-6989586621681029159"><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621681029159"><span class="hs-identifier hs-var">tsc</span></a></span></span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><a href="GHC.Cmm.Node.html#GlobalScope"><span class="hs-identifier hs-var">GlobalScope</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">t -&gt; Either t (CmmTickScope, t)
forall a b. a -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-var">Left</span></a></span><span> </span><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621681029159"><span class="hs-identifier hs-var">tsc</span></a></span><span> </span><span class="hs-comment">-- top scope</span><span>
</span><span id="line-105"></span><span>      </span><span class="annot"><a href="#local-6989586621681029162"><span class="hs-identifier hs-var">findP</span></a></span><span> </span><span id="local-6989586621681029157"><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621681029157"><span class="hs-identifier hs-var">tsc</span></a></span></span><span> </span><span id="local-6989586621681029156"><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621681029156"><span class="hs-identifier hs-var">scp</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621681029155"><span class="hs-identifier hs-var">scp'</span></a></span><span> </span><span class="annot"><span class="annottext">CmmTickScope -&gt; Map CmmTickScope [BlockContext] -&gt; Bool
forall k a. Ord k =&gt; k -&gt; Map k a -&gt; Bool
</span><a href="../../containers/src/Data.Map.Internal.html#member"><span class="hs-operator hs-var">`Map.member`</span></a></span><span> </span><span class="annot"><span class="annottext">Map CmmTickScope [BlockContext]
</span><a href="#local-6989586621681029166"><span class="hs-identifier hs-var">blockCtxs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(CmmTickScope, t) -&gt; Either t (CmmTickScope, t)
forall a b. b -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-var">Right</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621681029155"><span class="hs-identifier hs-var">scp'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621681029157"><span class="hs-identifier hs-var">tsc</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-106"></span><span>                    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>                   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">t -&gt; CmmTickScope -&gt; Either t (CmmTickScope, t)
</span><a href="#local-6989586621681029162"><span class="hs-identifier hs-var">findP</span></a></span><span> </span><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621681029157"><span class="hs-identifier hs-var">tsc</span></a></span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621681029155"><span class="hs-identifier hs-var">scp'</span></a></span><span>
</span><span id="line-107"></span><span>        </span><span class="hs-keyword">where</span><span> </span><span class="hs-comment">-- Note that we only following the left parent of</span><span>
</span><span id="line-108"></span><span>              </span><span class="hs-comment">-- combined scopes. This loses us ticks, which we will</span><span>
</span><span id="line-109"></span><span>              </span><span class="hs-comment">-- recover by copying ticks below.</span><span>
</span><span id="line-110"></span><span>              </span><span id="local-6989586621681029155"><span class="annot"><span class="annottext">scp' :: CmmTickScope
</span><a href="#local-6989586621681029155"><span class="hs-identifier hs-var hs-var">scp'</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#SubScope"><span class="hs-identifier hs-type">SubScope</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681029152"><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621681029152"><span class="hs-identifier hs-var">scp'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621681029156"><span class="hs-identifier hs-var">scp</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621681029152"><span class="hs-identifier hs-var">scp'</span></a></span><span>
</span><span id="line-111"></span><span>                   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#CombinedScope"><span class="hs-identifier hs-type">CombinedScope</span></a></span><span> </span><span id="local-6989586621681029150"><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621681029150"><span class="hs-identifier hs-var">scp'</span></a></span></span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621681029156"><span class="hs-identifier hs-var">scp</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621681029150"><span class="hs-identifier hs-var">scp'</span></a></span><span>
</span><span id="line-112"></span><span>                   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>                   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; CmmTickScope
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;findP impossible&quot;</span></span><span>
</span><span id="line-113"></span><span>
</span><span id="line-114"></span><span>      </span><span id="local-6989586621681029146"><span class="annot"><span class="annottext">scopeMap :: Map CmmTickScope [CmmTickScope]
</span><a href="#local-6989586621681029146"><span class="hs-identifier hs-var hs-var">scopeMap</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">((CmmTickScope, CmmTickScope)
 -&gt; Map CmmTickScope [CmmTickScope]
 -&gt; Map CmmTickScope [CmmTickScope])
-&gt; Map CmmTickScope [CmmTickScope]
-&gt; [(CmmTickScope, CmmTickScope)]
-&gt; Map CmmTickScope [CmmTickScope]
forall (t :: * -&gt; *) a b.
Foldable t =&gt;
(a -&gt; b -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldr"><span class="hs-identifier hs-var">foldr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(CmmTickScope
 -&gt; CmmTickScope
 -&gt; Map CmmTickScope [CmmTickScope]
 -&gt; Map CmmTickScope [CmmTickScope])
-&gt; (CmmTickScope, CmmTickScope)
-&gt; Map CmmTickScope [CmmTickScope]
-&gt; Map CmmTickScope [CmmTickScope]
forall a b c. (a -&gt; b -&gt; c) -&gt; (a, b) -&gt; c
</span><a href="../../base/src/Data.Tuple.html#uncurry"><span class="hs-identifier hs-var">uncurry</span></a></span><span> </span><span class="annot"><span class="annottext">CmmTickScope
-&gt; CmmTickScope
-&gt; Map CmmTickScope [CmmTickScope]
-&gt; Map CmmTickScope [CmmTickScope]
forall k a. Ord k =&gt; k -&gt; a -&gt; Map k [a] -&gt; Map k [a]
</span><a href="GHC.Cmm.DebugBlock.html#insertMulti"><span class="hs-identifier hs-var">insertMulti</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Map CmmTickScope [CmmTickScope]
forall k a. Map k a
</span><a href="../../containers/src/Data.Map.Internal.html#empty"><span class="hs-identifier hs-var">Map.empty</span></a></span><span> </span><span class="annot"><span class="annottext">[(CmmTickScope, CmmTickScope)]
</span><a href="#local-6989586621681029164"><span class="hs-identifier hs-var">childScopes</span></a></span><span>
</span><span id="line-115"></span><span>
</span><span id="line-116"></span><span>      </span><span class="hs-comment">-- This allows us to recover ticks that we lost by flattening</span><span>
</span><span id="line-117"></span><span>      </span><span class="hs-comment">-- the graph. Basically, if the parent is A but the child is</span><span>
</span><span id="line-118"></span><span>      </span><span class="hs-comment">-- CBA, we know that there is no BA, because it would have taken</span><span>
</span><span id="line-119"></span><span>      </span><span class="hs-comment">-- priority - but there might be a B scope, with ticks that</span><span>
</span><span id="line-120"></span><span>      </span><span class="hs-comment">-- would not be associated with our child anymore. Note however</span><span>
</span><span id="line-121"></span><span>      </span><span class="hs-comment">-- that there might be other childs (DB), which we have to</span><span>
</span><span id="line-122"></span><span>      </span><span class="hs-comment">-- filter out.</span><span>
</span><span id="line-123"></span><span>      </span><span class="hs-comment">--</span><span>
</span><span id="line-124"></span><span>      </span><span class="hs-comment">-- We expect this to be called rarely, which is why we are not</span><span>
</span><span id="line-125"></span><span>      </span><span class="hs-comment">-- trying too hard to be efficient here. In many cases we won't</span><span>
</span><span id="line-126"></span><span>      </span><span class="hs-comment">-- have to construct blockCtxsU in the first place.</span><span>
</span><span id="line-127"></span><span>      </span><span class="annot"><a href="#local-6989586621681029141"><span class="hs-identifier hs-type">ticksToCopy</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmTickScope"><span class="hs-identifier hs-type">CmmTickScope</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.Node.html#CmmTickish"><span class="hs-identifier hs-type">CmmTickish</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-128"></span><span>      </span><span id="local-6989586621681029141"><span class="annot"><span class="annottext">ticksToCopy :: CmmTickScope -&gt; [Tickish ()]
</span><a href="#local-6989586621681029141"><span class="hs-identifier hs-var hs-var">ticksToCopy</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Node.html#CombinedScope"><span class="hs-identifier hs-type">CombinedScope</span></a></span><span> </span><span id="local-6989586621681029140"><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621681029140"><span class="hs-identifier hs-var">scp</span></a></span></span><span> </span><span id="local-6989586621681029139"><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621681029139"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmTickScope -&gt; [Tickish ()]
</span><a href="#local-6989586621681029138"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621681029139"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-129"></span><span>        </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621681029138"><span class="annot"><span class="annottext">go :: CmmTickScope -&gt; [Tickish ()]
</span><a href="#local-6989586621681029138"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span id="local-6989586621681029137"><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621681029137"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621681029140"><span class="hs-identifier hs-var">scp</span></a></span><span> </span><span class="annot"><span class="annottext">CmmTickScope -&gt; CmmTickScope -&gt; Bool
</span><a href="GHC.Cmm.Node.html#isTickSubScope"><span class="hs-operator hs-var">`isTickSubScope`</span></a></span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621681029137"><span class="hs-identifier hs-var">s</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-comment">-- done</span><span>
</span><span id="line-130"></span><span>                   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#SubScope"><span class="hs-identifier hs-type">SubScope</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681029135"><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621681029135"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621681029137"><span class="hs-identifier hs-var">s</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Tickish ()]
</span><a href="#local-6989586621681029134"><span class="hs-identifier hs-var">ticks</span></a></span><span> </span><span class="annot"><span class="annottext">[Tickish ()] -&gt; [Tickish ()] -&gt; [Tickish ()]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">CmmTickScope -&gt; [Tickish ()]
</span><a href="#local-6989586621681029138"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621681029135"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-131"></span><span>                   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#CombinedScope"><span class="hs-identifier hs-type">CombinedScope</span></a></span><span> </span><span id="local-6989586621681029133"><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621681029133"><span class="hs-identifier hs-var">s1</span></a></span></span><span> </span><span id="local-6989586621681029132"><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621681029132"><span class="hs-identifier hs-var">s2</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621681029137"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Tickish ()]
</span><a href="#local-6989586621681029134"><span class="hs-identifier hs-var">ticks</span></a></span><span> </span><span class="annot"><span class="annottext">[Tickish ()] -&gt; [Tickish ()] -&gt; [Tickish ()]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">CmmTickScope -&gt; [Tickish ()]
</span><a href="#local-6989586621681029138"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621681029133"><span class="hs-identifier hs-var">s1</span></a></span><span> </span><span class="annot"><span class="annottext">[Tickish ()] -&gt; [Tickish ()] -&gt; [Tickish ()]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">CmmTickScope -&gt; [Tickish ()]
</span><a href="#local-6989586621681029138"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621681029132"><span class="hs-identifier hs-var">s2</span></a></span><span>
</span><span id="line-132"></span><span>                   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>                </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; [Tickish ()]
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ticksToCopy impossible&quot;</span></span><span>
</span><span id="line-133"></span><span>                </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621681029134"><span class="annot"><span class="annottext">ticks :: [Tickish ()]
</span><a href="#local-6989586621681029134"><span class="hs-identifier hs-var hs-var">ticks</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[BlockContext] -&gt; [Tickish ()]
forall {b}. [(Block CmmNode C C, b)] -&gt; [Tickish ()]
</span><a href="#local-6989586621681029131"><span class="hs-identifier hs-var">bCtxsTicks</span></a></span><span> </span><span class="annot"><span class="annottext">([BlockContext] -&gt; [Tickish ()]) -&gt; [BlockContext] -&gt; [Tickish ()]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[BlockContext] -&gt; Maybe [BlockContext] -&gt; [BlockContext]
forall a. a -&gt; Maybe a -&gt; a
</span><a href="../../base/src/Data.Maybe.html#fromMaybe"><span class="hs-identifier hs-var">fromMaybe</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">(Maybe [BlockContext] -&gt; [BlockContext])
-&gt; Maybe [BlockContext] -&gt; [BlockContext]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CmmTickScope
-&gt; Map CmmTickScope [BlockContext] -&gt; Maybe [BlockContext]
forall k a. Ord k =&gt; k -&gt; Map k a -&gt; Maybe a
</span><a href="../../containers/src/Data.Map.Internal.html#lookup"><span class="hs-identifier hs-var">Map.lookup</span></a></span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621681029137"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">Map CmmTickScope [BlockContext]
</span><a href="#local-6989586621681029166"><span class="hs-identifier hs-var">blockCtxs</span></a></span><span>
</span><span id="line-134"></span><span>      </span><span class="annot"><a href="#local-6989586621681029141"><span class="hs-identifier hs-var">ticksToCopy</span></a></span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-135"></span><span>      </span><span id="local-6989586621681029131"><span class="annot"><span class="annottext">bCtxsTicks :: [(Block CmmNode C C, b)] -&gt; [Tickish ()]
</span><a href="#local-6989586621681029131"><span class="hs-identifier hs-var hs-var">bCtxsTicks</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">((Block CmmNode C C, b) -&gt; [Tickish ()])
-&gt; [(Block CmmNode C C, b)] -&gt; [Tickish ()]
forall (t :: * -&gt; *) a b. Foldable t =&gt; (a -&gt; [b]) -&gt; t a -&gt; [b]
</span><a href="../../base/src/Data.Foldable.html#concatMap"><span class="hs-identifier hs-var">concatMap</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Block CmmNode C C -&gt; [Tickish ()]
</span><a href="GHC.Cmm.Utils.html#blockTicks"><span class="hs-identifier hs-var">blockTicks</span></a></span><span> </span><span class="annot"><span class="annottext">(Block CmmNode C C -&gt; [Tickish ()])
-&gt; ((Block CmmNode C C, b) -&gt; Block CmmNode C C)
-&gt; (Block CmmNode C C, b)
-&gt; [Tickish ()]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(Block CmmNode C C, b) -&gt; Block CmmNode C C
forall a b. (a, b) -&gt; a
</span><a href="../../base/src/Data.Tuple.html#fst"><span class="hs-identifier hs-var">fst</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-136"></span><span>
</span><span id="line-137"></span><span>      </span><span class="hs-comment">-- Finding the &quot;best&quot; source tick is somewhat arbitrary -- we</span><span>
</span><span id="line-138"></span><span>      </span><span class="hs-comment">-- select the first source span, while preferring source ticks</span><span>
</span><span id="line-139"></span><span>      </span><span class="hs-comment">-- from the same source file.  Furthermore, dumps take priority</span><span>
</span><span id="line-140"></span><span>      </span><span class="hs-comment">-- (if we generated one, we probably want debug information to</span><span>
</span><span id="line-141"></span><span>      </span><span class="hs-comment">-- refer to it).</span><span>
</span><span id="line-142"></span><span>      </span><span id="local-6989586621681029125"><span class="annot"><span class="annottext">bestSrcTick :: [Tickish ()] -&gt; Tickish ()
</span><a href="#local-6989586621681029125"><span class="hs-identifier hs-var hs-var">bestSrcTick</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Tickish () -&gt; Tickish () -&gt; Ordering)
-&gt; [Tickish ()] -&gt; Tickish ()
forall (t :: * -&gt; *) a.
Foldable t =&gt;
(a -&gt; a -&gt; Ordering) -&gt; t a -&gt; a
</span><a href="../../base/src/Data.Foldable.html#minimumBy"><span class="hs-identifier hs-var">minimumBy</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Tickish () -&gt; Int) -&gt; Tickish () -&gt; Tickish () -&gt; Ordering
forall a b. Ord a =&gt; (b -&gt; a) -&gt; b -&gt; b -&gt; Ordering
</span><a href="../../base/src/Data.Ord.html#comparing"><span class="hs-identifier hs-var">comparing</span></a></span><span> </span><span class="annot"><span class="annottext">Tickish () -&gt; Int
</span><a href="#local-6989586621681029124"><span class="hs-identifier hs-var">rangeRating</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-143"></span><span>      </span><span id="local-6989586621681029124"><span class="annot"><span class="annottext">rangeRating :: Tickish () -&gt; Int
</span><a href="#local-6989586621681029124"><span class="hs-identifier hs-var hs-var">rangeRating</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#SourceNote"><span class="hs-identifier hs-type">SourceNote</span></a></span><span> </span><span id="local-6989586621681029122"><span class="annot"><span class="annottext">RealSrcSpan
</span><a href="#local-6989586621681029122"><span class="hs-identifier hs-var">span</span></a></span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>
</span><span id="line-144"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">RealSrcSpan -&gt; FastString
</span><a href="GHC.Types.SrcLoc.html#srcSpanFile"><span class="hs-identifier hs-var hs-var">srcSpanFile</span></a></span><span> </span><span class="annot"><span class="annottext">RealSrcSpan
</span><a href="#local-6989586621681029122"><span class="hs-identifier hs-var">span</span></a></span><span> </span><span class="annot"><span class="annottext">FastString -&gt; FastString -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621681029120"><span class="hs-identifier hs-var">thisFile</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span>
</span><span id="line-145"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>                    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>
</span><span id="line-146"></span><span>      </span><span class="annot"><a href="#local-6989586621681029124"><span class="hs-identifier hs-var">rangeRating</span></a></span><span> </span><span id="local-6989586621681029119"><span class="annot"><span class="annottext">Tickish ()
</span><a href="#local-6989586621681029119"><span class="hs-identifier hs-var">note</span></a></span></span><span>                 </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc -&gt; Int
forall a. HasCallStack =&gt; String -&gt; SDoc -&gt; a
</span><a href="GHC.Utils.Outputable.html#pprPanic"><span class="hs-identifier hs-var">pprPanic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;rangeRating&quot;</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Tickish () -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Tickish ()
</span><a href="#local-6989586621681029119"><span class="hs-identifier hs-var">note</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-147"></span><span>      </span><span id="local-6989586621681029120"><span class="annot"><span class="annottext">thisFile :: FastString
</span><a href="#local-6989586621681029120"><span class="hs-identifier hs-var hs-var">thisFile</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FastString -&gt; (String -&gt; FastString) -&gt; Maybe String -&gt; FastString
forall b a. b -&gt; (a -&gt; b) -&gt; Maybe a -&gt; b
</span><a href="../../base/src/Data.Maybe.html#maybe"><span class="hs-identifier hs-var">maybe</span></a></span><span> </span><span class="annot"><span class="annottext">FastString
</span><a href="GHC.Data.FastString.html#nilFS"><span class="hs-identifier hs-var">nilFS</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; FastString
</span><a href="GHC.Data.FastString.html#mkFastString"><span class="hs-identifier hs-var">mkFastString</span></a></span><span> </span><span class="annot"><span class="annottext">(Maybe String -&gt; FastString) -&gt; Maybe String -&gt; FastString
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">ModLocation -&gt; Maybe String
</span><a href="GHC.Unit.Module.Location.html#ml_hs_file"><span class="hs-identifier hs-var hs-var">ml_hs_file</span></a></span><span> </span><span class="annot"><span class="annottext">ModLocation
</span><a href="#local-6989586621681029170"><span class="hs-identifier hs-var">modLoc</span></a></span><span>
</span><span id="line-148"></span><span>
</span><span id="line-149"></span><span>      </span><span class="hs-comment">-- Returns block tree for this scope as well as all nested</span><span>
</span><span id="line-150"></span><span>      </span><span class="hs-comment">-- scopes. Note that if there are multiple blocks in the (exact)</span><span>
</span><span id="line-151"></span><span>      </span><span class="hs-comment">-- same scope we elect one as the &quot;branch&quot; node and add the rest</span><span>
</span><span id="line-152"></span><span>      </span><span class="hs-comment">-- as children.</span><span>
</span><span id="line-153"></span><span>      </span><span class="annot"><a href="#local-6989586621681029168"><span class="hs-identifier hs-type">blocksForScope</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmTickish"><span class="hs-identifier hs-type">CmmTickish</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmTickScope"><span class="hs-identifier hs-type">CmmTickScope</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#DebugBlock"><span class="hs-identifier hs-type">DebugBlock</span></a></span><span>
</span><span id="line-154"></span><span>      </span><span id="local-6989586621681029168"><span class="annot"><span class="annottext">blocksForScope :: Maybe (Tickish ()) -&gt; CmmTickScope -&gt; DebugBlock
</span><a href="#local-6989586621681029168"><span class="hs-identifier hs-var hs-var">blocksForScope</span></a></span></span><span> </span><span id="local-6989586621681029116"><span class="annot"><span class="annottext">Maybe (Tickish ())
</span><a href="#local-6989586621681029116"><span class="hs-identifier hs-var">cstick</span></a></span></span><span> </span><span id="local-6989586621681029115"><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621681029115"><span class="hs-identifier hs-var">scope</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; BlockContext -&gt; DebugBlock
</span><a href="#local-6989586621681029114"><span class="hs-identifier hs-var">mkBlock</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[BlockContext] -&gt; BlockContext
forall a. [a] -&gt; a
</span><a href="../../base/src/GHC.List.html#head"><span class="hs-identifier hs-var">head</span></a></span><span> </span><span class="annot"><span class="annottext">[BlockContext]
</span><a href="#local-6989586621681029112"><span class="hs-identifier hs-var">bctxs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-155"></span><span>        </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621681029112"><span class="annot"><span class="annottext">bctxs :: [BlockContext]
</span><a href="#local-6989586621681029112"><span class="hs-identifier hs-var hs-var">bctxs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe [BlockContext] -&gt; [BlockContext]
forall a. HasCallStack =&gt; Maybe a -&gt; a
</span><a href="../../base/src/Data.Maybe.html#fromJust"><span class="hs-identifier hs-var">fromJust</span></a></span><span> </span><span class="annot"><span class="annottext">(Maybe [BlockContext] -&gt; [BlockContext])
-&gt; Maybe [BlockContext] -&gt; [BlockContext]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CmmTickScope
-&gt; Map CmmTickScope [BlockContext] -&gt; Maybe [BlockContext]
forall k a. Ord k =&gt; k -&gt; Map k a -&gt; Maybe a
</span><a href="../../containers/src/Data.Map.Internal.html#lookup"><span class="hs-identifier hs-var">Map.lookup</span></a></span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621681029115"><span class="hs-identifier hs-var">scope</span></a></span><span> </span><span class="annot"><span class="annottext">Map CmmTickScope [BlockContext]
</span><a href="#local-6989586621681029166"><span class="hs-identifier hs-var">blockCtxs</span></a></span><span>
</span><span id="line-156"></span><span>              </span><span id="local-6989586621681029110"><span class="annot"><span class="annottext">nested :: [CmmTickScope]
</span><a href="#local-6989586621681029110"><span class="hs-identifier hs-var hs-var">nested</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[CmmTickScope] -&gt; Maybe [CmmTickScope] -&gt; [CmmTickScope]
forall a. a -&gt; Maybe a -&gt; a
</span><a href="../../base/src/Data.Maybe.html#fromMaybe"><span class="hs-identifier hs-var">fromMaybe</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">(Maybe [CmmTickScope] -&gt; [CmmTickScope])
-&gt; Maybe [CmmTickScope] -&gt; [CmmTickScope]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CmmTickScope
-&gt; Map CmmTickScope [CmmTickScope] -&gt; Maybe [CmmTickScope]
forall k a. Ord k =&gt; k -&gt; Map k a -&gt; Maybe a
</span><a href="../../containers/src/Data.Map.Internal.html#lookup"><span class="hs-identifier hs-var">Map.lookup</span></a></span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621681029115"><span class="hs-identifier hs-var">scope</span></a></span><span> </span><span class="annot"><span class="annottext">Map CmmTickScope [CmmTickScope]
</span><a href="#local-6989586621681029146"><span class="hs-identifier hs-var">scopeMap</span></a></span><span>
</span><span id="line-157"></span><span>              </span><span id="local-6989586621681029109"><span class="annot"><span class="annottext">childs :: [DebugBlock]
</span><a href="#local-6989586621681029109"><span class="hs-identifier hs-var hs-var">childs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(BlockContext -&gt; DebugBlock) -&gt; [BlockContext] -&gt; [DebugBlock]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool -&gt; BlockContext -&gt; DebugBlock
</span><a href="#local-6989586621681029114"><span class="hs-identifier hs-var">mkBlock</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[BlockContext] -&gt; [BlockContext]
forall a. [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#tail"><span class="hs-identifier hs-var">tail</span></a></span><span> </span><span class="annot"><span class="annottext">[BlockContext]
</span><a href="#local-6989586621681029112"><span class="hs-identifier hs-var">bctxs</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[DebugBlock] -&gt; [DebugBlock] -&gt; [DebugBlock]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-158"></span><span>                       </span><span class="annot"><span class="annottext">(CmmTickScope -&gt; DebugBlock) -&gt; [CmmTickScope] -&gt; [DebugBlock]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Maybe (Tickish ()) -&gt; CmmTickScope -&gt; DebugBlock
</span><a href="#local-6989586621681029168"><span class="hs-identifier hs-var">blocksForScope</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe (Tickish ())
</span><a href="#local-6989586621681029107"><span class="hs-identifier hs-var">stick</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[CmmTickScope]
</span><a href="#local-6989586621681029110"><span class="hs-identifier hs-var">nested</span></a></span><span>
</span><span id="line-159"></span><span>
</span><span id="line-160"></span><span>              </span><span class="annot"><a href="#local-6989586621681029114"><span class="hs-identifier hs-type">mkBlock</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#BlockContext"><span class="hs-identifier hs-type">BlockContext</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#DebugBlock"><span class="hs-identifier hs-type">DebugBlock</span></a></span><span>
</span><span id="line-161"></span><span>              </span><span id="local-6989586621681029114"><span class="annot"><span class="annottext">mkBlock :: Bool -&gt; BlockContext -&gt; DebugBlock
</span><a href="#local-6989586621681029114"><span class="hs-identifier hs-var hs-var">mkBlock</span></a></span></span><span> </span><span id="local-6989586621681029106"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681029106"><span class="hs-identifier hs-var">top</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621681029105"><span class="annot"><span class="annottext">Block CmmNode C C
</span><a href="#local-6989586621681029105"><span class="hs-identifier hs-var">block</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681029104"><span class="annot"><span class="annottext">RawCmmDecl
</span><a href="#local-6989586621681029104"><span class="hs-identifier hs-var">prc</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-162"></span><span>                </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DebugBlock :: Label
-&gt; Label
-&gt; CLabel
-&gt; Bool
-&gt; Maybe DebugBlock
-&gt; [Tickish ()]
-&gt; Maybe (Tickish ())
-&gt; Maybe Int
-&gt; [UnwindPoint]
-&gt; [DebugBlock]
-&gt; DebugBlock
</span><a href="GHC.Cmm.DebugBlock.html#DebugBlock"><span class="hs-identifier hs-type">DebugBlock</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">dblProcedure :: Label
</span><a href="GHC.Cmm.DebugBlock.html#dblProcedure"><span class="hs-identifier hs-var">dblProcedure</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GenCmmGraph CmmNode -&gt; Label
forall (n :: Extensibility -&gt; Extensibility -&gt; *).
GenCmmGraph n -&gt; Label
</span><a href="GHC.Cmm.html#g_entry"><span class="hs-identifier hs-var hs-var">g_entry</span></a></span><span> </span><span class="annot"><span class="annottext">GenCmmGraph CmmNode
</span><a href="#local-6989586621681029102"><span class="hs-identifier hs-var">graph</span></a></span><span>
</span><span id="line-163"></span><span>                             </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">dblLabel :: Label
</span><a href="GHC.Cmm.DebugBlock.html#dblLabel"><span class="hs-identifier hs-var">dblLabel</span></a></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Label
</span><a href="#local-6989586621681029101"><span class="hs-keyword hs-var">label</span></a></span><span>
</span><span id="line-164"></span><span>                             </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">dblCLabel :: CLabel
</span><a href="GHC.Cmm.DebugBlock.html#dblCLabel"><span class="hs-identifier hs-var">dblCLabel</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Maybe RawCmmStatics
</span><a href="#local-6989586621681029100"><span class="hs-identifier hs-var">info</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-165"></span><span>                                 </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#CmmStaticsRaw"><span class="hs-identifier hs-type">CmmStaticsRaw</span></a></span><span> </span><span id="local-6989586621681029098"><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681029098"><span class="hs-identifier hs-var">infoLbl</span></a></span></span><span> </span><span class="annot"><span class="annottext">[CmmStatic]
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681029098"><span class="hs-identifier hs-var">infoLbl</span></a></span><span>
</span><span id="line-166"></span><span>                                 </span><span class="annot"><span class="annottext">Maybe RawCmmStatics
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-167"></span><span>                                   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">GenCmmGraph CmmNode -&gt; Label
forall (n :: Extensibility -&gt; Extensibility -&gt; *).
GenCmmGraph n -&gt; Label
</span><a href="GHC.Cmm.html#g_entry"><span class="hs-identifier hs-var hs-var">g_entry</span></a></span><span> </span><span class="annot"><span class="annottext">GenCmmGraph CmmNode
</span><a href="#local-6989586621681029102"><span class="hs-identifier hs-var">graph</span></a></span><span> </span><span class="annot"><span class="annottext">Label -&gt; Label -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Label
</span><a href="#local-6989586621681029101"><span class="hs-keyword hs-var">label</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681029097"><span class="hs-identifier hs-var">entryLbl</span></a></span><span>
</span><span id="line-168"></span><span>                                   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Label -&gt; CLabel
</span><a href="GHC.Cmm.BlockId.html#blockLbl"><span class="hs-identifier hs-var">blockLbl</span></a></span><span> </span><span class="annot"><span class="annottext">Label
</span><a href="#local-6989586621681029101"><span class="hs-keyword hs-var">label</span></a></span><span>
</span><span id="line-169"></span><span>                             </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">dblHasInfoTbl :: Bool
</span><a href="GHC.Cmm.DebugBlock.html#dblHasInfoTbl"><span class="hs-identifier hs-var">dblHasInfoTbl</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe RawCmmStatics -&gt; Bool
forall a. Maybe a -&gt; Bool
</span><a href="../../base/src/Data.Maybe.html#isJust"><span class="hs-identifier hs-var">isJust</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe RawCmmStatics
</span><a href="#local-6989586621681029100"><span class="hs-identifier hs-var">info</span></a></span><span>
</span><span id="line-170"></span><span>                             </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">dblParent :: Maybe DebugBlock
</span><a href="GHC.Cmm.DebugBlock.html#dblParent"><span class="hs-identifier hs-var">dblParent</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe DebugBlock
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-171"></span><span>                             </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">dblTicks :: [Tickish ()]
</span><a href="GHC.Cmm.DebugBlock.html#dblTicks"><span class="hs-identifier hs-var">dblTicks</span></a></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Tickish ()]
</span><a href="#local-6989586621681029094"><span class="hs-identifier hs-var">ticks</span></a></span><span>
</span><span id="line-172"></span><span>                             </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">dblPosition :: Maybe Int
</span><a href="GHC.Cmm.DebugBlock.html#dblPosition"><span class="hs-identifier hs-var">dblPosition</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe Int
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-comment">-- see cmmDebugLink</span><span>
</span><span id="line-173"></span><span>                             </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">dblSourceTick :: Maybe (Tickish ())
</span><a href="GHC.Cmm.DebugBlock.html#dblSourceTick"><span class="hs-identifier hs-var">dblSourceTick</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe (Tickish ())
</span><a href="#local-6989586621681029107"><span class="hs-identifier hs-var">stick</span></a></span><span>
</span><span id="line-174"></span><span>                             </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">dblBlocks :: [DebugBlock]
</span><a href="GHC.Cmm.DebugBlock.html#dblBlocks"><span class="hs-identifier hs-var">dblBlocks</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[DebugBlock]
</span><a href="#local-6989586621681029093"><span class="hs-identifier hs-var">blocks</span></a></span><span>
</span><span id="line-175"></span><span>                             </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">dblUnwind :: [UnwindPoint]
</span><a href="GHC.Cmm.DebugBlock.html#dblUnwind"><span class="hs-identifier hs-var">dblUnwind</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-176"></span><span>                             </span><span class="hs-special">}</span><span>
</span><span id="line-177"></span><span>                </span><span class="hs-keyword">where</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#CmmProc"><span class="hs-identifier hs-type">CmmProc</span></a></span><span> </span><span id="local-6989586621681029091"><span class="annot"><span class="annottext">LabelMap RawCmmStatics
</span><a href="#local-6989586621681029091"><span class="hs-identifier hs-var">infos</span></a></span></span><span> </span><span id="local-6989586621681029097"><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681029097"><span class="hs-identifier hs-var">entryLbl</span></a></span></span><span> </span><span class="annot"><span class="annottext">[GlobalReg]
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681029102"><span class="annot"><span class="annottext">GenCmmGraph CmmNode
</span><a href="#local-6989586621681029102"><span class="hs-identifier hs-var">graph</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RawCmmDecl
</span><a href="#local-6989586621681029104"><span class="hs-identifier hs-var">prc</span></a></span><span>
</span><span id="line-178"></span><span>                      </span><span id="local-6989586621681029101"><span class="annot"><span class="annottext">label :: Label
</span><a href="#local-6989586621681029101"><span class="hs-keyword hs-var hs-var">label</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Block CmmNode C C -&gt; Label
forall (thing :: Extensibility -&gt; Extensibility -&gt; *)
       (x :: Extensibility).
NonLocal thing =&gt;
thing C x -&gt; Label
</span><a href="GHC.Cmm.Dataflow.Graph.html#entryLabel"><span class="hs-identifier hs-var">entryLabel</span></a></span><span> </span><span class="annot"><span class="annottext">Block CmmNode C C
</span><a href="#local-6989586621681029105"><span class="hs-identifier hs-var">block</span></a></span><span>
</span><span id="line-179"></span><span>                      </span><span id="local-6989586621681029100"><span class="annot"><span class="annottext">info :: Maybe RawCmmStatics
</span><a href="#local-6989586621681029100"><span class="hs-identifier hs-var hs-var">info</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">KeyOf LabelMap -&gt; LabelMap RawCmmStatics -&gt; Maybe RawCmmStatics
forall (map :: * -&gt; *) a.
IsMap map =&gt;
KeyOf map -&gt; map a -&gt; Maybe a
</span><a href="GHC.Cmm.Dataflow.Collections.html#mapLookup"><span class="hs-identifier hs-var">mapLookup</span></a></span><span> </span><span class="annot"><span class="annottext">KeyOf LabelMap
Label
</span><a href="#local-6989586621681029101"><span class="hs-keyword hs-var">label</span></a></span><span> </span><span class="annot"><span class="annottext">LabelMap RawCmmStatics
</span><a href="#local-6989586621681029091"><span class="hs-identifier hs-var">infos</span></a></span><span>
</span><span id="line-180"></span><span>                      </span><span id="local-6989586621681029093"><span class="annot"><span class="annottext">blocks :: [DebugBlock]
</span><a href="#local-6989586621681029093"><span class="hs-identifier hs-var hs-var">blocks</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681029106"><span class="hs-identifier hs-var">top</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[DebugBlock] -&gt; [DebugBlock] -&gt; [DebugBlock]
forall a b. [a] -&gt; b -&gt; b
</span><a href="GHC.Utils.Misc.html#seqList"><span class="hs-identifier hs-var">seqList</span></a></span><span> </span><span class="annot"><span class="annottext">[DebugBlock]
</span><a href="#local-6989586621681029109"><span class="hs-identifier hs-var">childs</span></a></span><span> </span><span class="annot"><span class="annottext">[DebugBlock]
</span><a href="#local-6989586621681029109"><span class="hs-identifier hs-var">childs</span></a></span><span>
</span><span id="line-181"></span><span>                             </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-182"></span><span>
</span><span id="line-183"></span><span>              </span><span class="hs-comment">-- A source tick scopes over all nested blocks. However</span><span>
</span><span id="line-184"></span><span>              </span><span class="hs-comment">-- their source ticks might take priority.</span><span>
</span><span id="line-185"></span><span>              </span><span id="local-6989586621681029088"><span class="annot"><span class="annottext">isSourceTick :: Tickish id -&gt; Bool
</span><a href="#local-6989586621681029088"><span class="hs-identifier hs-var hs-var">isSourceTick</span></a></span></span><span> </span><span class="annot"><a href="GHC.Core.html#SourceNote"><span class="hs-identifier hs-type">SourceNote</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-186"></span><span>              </span><span class="annot"><a href="#local-6989586621681029088"><span class="hs-identifier hs-var">isSourceTick</span></a></span><span> </span><span class="annot"><span class="annottext">Tickish id
</span><span class="hs-identifier">_</span></span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-187"></span><span>              </span><span class="hs-comment">-- Collect ticks from all blocks inside the tick scope.</span><span>
</span><span id="line-188"></span><span>              </span><span class="hs-comment">-- We attempt to filter out duplicates while we're at it.</span><span>
</span><span id="line-189"></span><span>              </span><span id="local-6989586621681029094"><span class="annot"><span class="annottext">ticks :: [Tickish ()]
</span><a href="#local-6989586621681029094"><span class="hs-identifier hs-var hs-var">ticks</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Tickish () -&gt; Tickish () -&gt; Bool) -&gt; [Tickish ()] -&gt; [Tickish ()]
forall a. (a -&gt; a -&gt; Bool) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/Data.OldList.html#nubBy"><span class="hs-identifier hs-var">nubBy</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Tickish () -&gt; Tickish () -&gt; Bool)
-&gt; Tickish () -&gt; Tickish () -&gt; Bool
forall a b c. (a -&gt; b -&gt; c) -&gt; b -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#flip"><span class="hs-identifier hs-var">flip</span></a></span><span> </span><span class="annot"><span class="annottext">Tickish () -&gt; Tickish () -&gt; Bool
forall b. Eq b =&gt; Tickish b -&gt; Tickish b -&gt; Bool
</span><a href="GHC.Core.html#tickishContains"><span class="hs-identifier hs-var">tickishContains</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">([Tickish ()] -&gt; [Tickish ()]) -&gt; [Tickish ()] -&gt; [Tickish ()]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-190"></span><span>                      </span><span class="annot"><span class="annottext">[BlockContext] -&gt; [Tickish ()]
forall {b}. [(Block CmmNode C C, b)] -&gt; [Tickish ()]
</span><a href="#local-6989586621681029131"><span class="hs-identifier hs-var">bCtxsTicks</span></a></span><span> </span><span class="annot"><span class="annottext">[BlockContext]
</span><a href="#local-6989586621681029112"><span class="hs-identifier hs-var">bctxs</span></a></span><span> </span><span class="annot"><span class="annottext">[Tickish ()] -&gt; [Tickish ()] -&gt; [Tickish ()]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">CmmTickScope -&gt; [Tickish ()]
</span><a href="#local-6989586621681029141"><span class="hs-identifier hs-var">ticksToCopy</span></a></span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621681029115"><span class="hs-identifier hs-var">scope</span></a></span><span>
</span><span id="line-191"></span><span>              </span><span id="local-6989586621681029107"><span class="annot"><span class="annottext">stick :: Maybe (Tickish ())
</span><a href="#local-6989586621681029107"><span class="hs-identifier hs-var hs-var">stick</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">(Tickish () -&gt; Bool) -&gt; [Tickish ()] -&gt; [Tickish ()]
forall a. (a -&gt; Bool) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#filter"><span class="hs-identifier hs-var">filter</span></a></span><span> </span><span class="annot"><span class="annottext">Tickish () -&gt; Bool
forall {id}. Tickish id -&gt; Bool
</span><a href="#local-6989586621681029088"><span class="hs-identifier hs-var">isSourceTick</span></a></span><span> </span><span class="annot"><span class="annottext">[Tickish ()]
</span><a href="#local-6989586621681029094"><span class="hs-identifier hs-var">ticks</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-192"></span><span>                </span><span class="hs-special">[</span><span class="hs-special">]</span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe (Tickish ())
</span><a href="#local-6989586621681029116"><span class="hs-identifier hs-var">cstick</span></a></span><span>
</span><span id="line-193"></span><span>                </span><span id="local-6989586621681029085"><span class="annot"><span class="annottext">[Tickish ()]
</span><a href="#local-6989586621681029085"><span class="hs-identifier hs-var">sticks</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Tickish () -&gt; Maybe (Tickish ())
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">(Tickish () -&gt; Maybe (Tickish ()))
-&gt; Tickish () -&gt; Maybe (Tickish ())
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24%21"><span class="hs-operator hs-var">$!</span></a></span><span> </span><span class="annot"><span class="annottext">[Tickish ()] -&gt; Tickish ()
</span><a href="#local-6989586621681029125"><span class="hs-identifier hs-var">bestSrcTick</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Tickish ()]
</span><a href="#local-6989586621681029085"><span class="hs-identifier hs-var">sticks</span></a></span><span> </span><span class="annot"><span class="annottext">[Tickish ()] -&gt; [Tickish ()] -&gt; [Tickish ()]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe (Tickish ()) -&gt; [Tickish ()]
forall a. Maybe a -&gt; [a]
</span><a href="../../base/src/Data.Maybe.html#maybeToList"><span class="hs-identifier hs-var">maybeToList</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe (Tickish ())
</span><a href="#local-6989586621681029116"><span class="hs-identifier hs-var">cstick</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-194"></span><span>
</span><span id="line-195"></span><span class="hs-comment">-- | Build a map of blocks sorted by their tick scopes</span><span>
</span><span id="line-196"></span><span class="hs-comment">--</span><span>
</span><span id="line-197"></span><span class="hs-comment">-- This involves a pre-order traversal, as we want blocks in rough</span><span>
</span><span id="line-198"></span><span class="hs-comment">-- control flow order (so ticks have a chance to be sorted in the</span><span>
</span><span id="line-199"></span><span class="hs-comment">-- right order).</span><span>
</span><span id="line-200"></span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#blockContexts"><span class="hs-identifier hs-type">blockContexts</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.html#RawCmmGroup"><span class="hs-identifier hs-type">RawCmmGroup</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../containers/src/Data.Map.Internal.html#Map"><span class="hs-identifier hs-type">Map.Map</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmTickScope"><span class="hs-identifier hs-type">CmmTickScope</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#BlockContext"><span class="hs-identifier hs-type">BlockContext</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-201"></span><span id="blockContexts"><span class="annot"><span class="annottext">blockContexts :: RawCmmGroup -&gt; Map CmmTickScope [BlockContext]
</span><a href="GHC.Cmm.DebugBlock.html#blockContexts"><span class="hs-identifier hs-var hs-var">blockContexts</span></a></span></span><span> </span><span id="local-6989586621681029082"><span class="annot"><span class="annottext">RawCmmGroup
</span><a href="#local-6989586621681029082"><span class="hs-identifier hs-var">decls</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">([BlockContext] -&gt; [BlockContext])
-&gt; Map CmmTickScope [BlockContext]
-&gt; Map CmmTickScope [BlockContext]
forall a b k. (a -&gt; b) -&gt; Map k a -&gt; Map k b
</span><a href="../../containers/src/Data.Map.Internal.html#map"><span class="hs-identifier hs-var">Map.map</span></a></span><span> </span><span class="annot"><span class="annottext">[BlockContext] -&gt; [BlockContext]
forall a. [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#reverse"><span class="hs-identifier hs-var">reverse</span></a></span><span> </span><span class="annot"><span class="annottext">(Map CmmTickScope [BlockContext]
 -&gt; Map CmmTickScope [BlockContext])
-&gt; Map CmmTickScope [BlockContext]
-&gt; Map CmmTickScope [BlockContext]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(RawCmmDecl
 -&gt; Map CmmTickScope [BlockContext]
 -&gt; Map CmmTickScope [BlockContext])
-&gt; Map CmmTickScope [BlockContext]
-&gt; RawCmmGroup
-&gt; Map CmmTickScope [BlockContext]
forall (t :: * -&gt; *) a b.
Foldable t =&gt;
(a -&gt; b -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldr"><span class="hs-identifier hs-var">foldr</span></a></span><span> </span><span class="annot"><span class="annottext">RawCmmDecl
-&gt; Map CmmTickScope [BlockContext]
-&gt; Map CmmTickScope [BlockContext]
</span><a href="#local-6989586621681029079"><span class="hs-identifier hs-var">walkProc</span></a></span><span> </span><span class="annot"><span class="annottext">Map CmmTickScope [BlockContext]
forall k a. Map k a
</span><a href="../../containers/src/Data.Map.Internal.html#empty"><span class="hs-identifier hs-var">Map.empty</span></a></span><span> </span><span class="annot"><span class="annottext">RawCmmGroup
</span><a href="#local-6989586621681029082"><span class="hs-identifier hs-var">decls</span></a></span><span>
</span><span id="line-202"></span><span>  </span><span class="hs-keyword">where</span><span> </span><span class="annot"><a href="#local-6989586621681029079"><span class="hs-identifier hs-type">walkProc</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.html#RawCmmDecl"><span class="hs-identifier hs-type">RawCmmDecl</span></a></span><span>
</span><span id="line-203"></span><span>                 </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../containers/src/Data.Map.Internal.html#Map"><span class="hs-identifier hs-type">Map.Map</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmTickScope"><span class="hs-identifier hs-type">CmmTickScope</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#BlockContext"><span class="hs-identifier hs-type">BlockContext</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-204"></span><span>                 </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../containers/src/Data.Map.Internal.html#Map"><span class="hs-identifier hs-type">Map.Map</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmTickScope"><span class="hs-identifier hs-type">CmmTickScope</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#BlockContext"><span class="hs-identifier hs-type">BlockContext</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-205"></span><span>        </span><span id="local-6989586621681029079"><span class="annot"><span class="annottext">walkProc :: RawCmmDecl
-&gt; Map CmmTickScope [BlockContext]
-&gt; Map CmmTickScope [BlockContext]
</span><a href="#local-6989586621681029079"><span class="hs-identifier hs-var hs-var">walkProc</span></a></span></span><span> </span><span class="annot"><a href="GHC.Cmm.html#CmmData"><span class="hs-identifier hs-type">CmmData</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span>                 </span><span id="local-6989586621681029077"><span class="annot"><span class="annottext">Map CmmTickScope [BlockContext]
</span><a href="#local-6989586621681029077"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Map CmmTickScope [BlockContext]
</span><a href="#local-6989586621681029077"><span class="hs-identifier hs-var">m</span></a></span><span>
</span><span id="line-206"></span><span>        </span><span class="annot"><a href="#local-6989586621681029079"><span class="hs-identifier hs-var">walkProc</span></a></span><span> </span><span id="local-6989586621681029076"><span class="annot"><span class="annottext">prc :: RawCmmDecl
</span><a href="#local-6989586621681029076"><span class="hs-identifier hs-var">prc</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#CmmProc"><span class="hs-identifier hs-type">CmmProc</span></a></span><span> </span><span class="annot"><span class="annottext">LabelMap RawCmmStatics
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">[GlobalReg]
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681029075"><span class="annot"><span class="annottext">GenCmmGraph CmmNode
</span><a href="#local-6989586621681029075"><span class="hs-identifier hs-var">graph</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621681029074"><span class="annot"><span class="annottext">Map CmmTickScope [BlockContext]
</span><a href="#local-6989586621681029074"><span class="hs-identifier hs-var">m</span></a></span></span><span>
</span><span id="line-207"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">LabelMap (Block CmmNode C C) -&gt; Bool
forall (map :: * -&gt; *) a. IsMap map =&gt; map a -&gt; Bool
</span><a href="GHC.Cmm.Dataflow.Collections.html#mapNull"><span class="hs-identifier hs-var">mapNull</span></a></span><span> </span><span class="annot"><span class="annottext">LabelMap (Block CmmNode C C)
</span><a href="#local-6989586621681029072"><span class="hs-identifier hs-var">blocks</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Map CmmTickScope [BlockContext]
</span><a href="#local-6989586621681029074"><span class="hs-identifier hs-var">m</span></a></span><span>
</span><span id="line-208"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(LabelSet, Map CmmTickScope [BlockContext])
-&gt; Map CmmTickScope [BlockContext]
forall a b. (a, b) -&gt; b
</span><a href="../../base/src/Data.Tuple.html#snd"><span class="hs-identifier hs-var">snd</span></a></span><span> </span><span class="annot"><span class="annottext">((LabelSet, Map CmmTickScope [BlockContext])
 -&gt; Map CmmTickScope [BlockContext])
-&gt; (LabelSet, Map CmmTickScope [BlockContext])
-&gt; Map CmmTickScope [BlockContext]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">RawCmmDecl
-&gt; [Block CmmNode C C]
-&gt; (LabelSet, Map CmmTickScope [BlockContext])
-&gt; (LabelSet, Map CmmTickScope [BlockContext])
</span><a href="#local-6989586621681029071"><span class="hs-identifier hs-var">walkBlock</span></a></span><span> </span><span class="annot"><span class="annottext">RawCmmDecl
</span><a href="#local-6989586621681029076"><span class="hs-identifier hs-var">prc</span></a></span><span> </span><span class="annot"><span class="annottext">[Block CmmNode C C]
</span><a href="#local-6989586621681029070"><span class="hs-identifier hs-var">entry</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LabelSet
</span><a href="#local-6989586621681029069"><span class="hs-identifier hs-var">emptyLbls</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Map CmmTickScope [BlockContext]
</span><a href="#local-6989586621681029074"><span class="hs-identifier hs-var">m</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-209"></span><span>          </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621681029072"><span class="annot"><span class="annottext">blocks :: LabelMap (Block CmmNode C C)
</span><a href="#local-6989586621681029072"><span class="hs-identifier hs-var hs-var">blocks</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GenCmmGraph CmmNode -&gt; LabelMap (Block CmmNode C C)
</span><a href="GHC.Cmm.Utils.html#toBlockMap"><span class="hs-identifier hs-var">toBlockMap</span></a></span><span> </span><span class="annot"><span class="annottext">GenCmmGraph CmmNode
</span><a href="#local-6989586621681029075"><span class="hs-identifier hs-var">graph</span></a></span><span>
</span><span id="line-210"></span><span>                </span><span id="local-6989586621681029070"><span class="annot"><span class="annottext">entry :: [Block CmmNode C C]
</span><a href="#local-6989586621681029070"><span class="hs-identifier hs-var hs-var">entry</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">KeyOf LabelMap -&gt; LabelMap (Block CmmNode C C) -&gt; Block CmmNode C C
forall {a}. KeyOf LabelMap -&gt; LabelMap a -&gt; a
</span><a href="#local-6989586621681029067"><span class="hs-identifier hs-var">mapFind</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">GenCmmGraph CmmNode -&gt; Label
forall (n :: Extensibility -&gt; Extensibility -&gt; *).
GenCmmGraph n -&gt; Label
</span><a href="GHC.Cmm.html#g_entry"><span class="hs-identifier hs-var hs-var">g_entry</span></a></span><span> </span><span class="annot"><span class="annottext">GenCmmGraph CmmNode
</span><a href="#local-6989586621681029075"><span class="hs-identifier hs-var">graph</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">LabelMap (Block CmmNode C C)
</span><a href="#local-6989586621681029072"><span class="hs-identifier hs-var">blocks</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-211"></span><span>                </span><span id="local-6989586621681029069"><span class="annot"><span class="annottext">emptyLbls :: LabelSet
</span><a href="#local-6989586621681029069"><span class="hs-identifier hs-var hs-var">emptyLbls</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LabelSet
forall set. IsSet set =&gt; set
</span><a href="GHC.Cmm.Dataflow.Collections.html#setEmpty"><span class="hs-identifier hs-var">setEmpty</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Label.html#LabelSet"><span class="hs-identifier hs-type">LabelSet</span></a></span><span>
</span><span id="line-212"></span><span>
</span><span id="line-213"></span><span>        </span><span class="annot"><a href="#local-6989586621681029071"><span class="hs-identifier hs-type">walkBlock</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.html#RawCmmDecl"><span class="hs-identifier hs-type">RawCmmDecl</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#Block"><span class="hs-identifier hs-type">Block</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmNode"><span class="hs-identifier hs-type">CmmNode</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#C"><span class="hs-identifier hs-type">C</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#C"><span class="hs-identifier hs-type">C</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-214"></span><span>                  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Dataflow.Label.html#LabelSet"><span class="hs-identifier hs-type">LabelSet</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../containers/src/Data.Map.Internal.html#Map"><span class="hs-identifier hs-type">Map.Map</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmTickScope"><span class="hs-identifier hs-type">CmmTickScope</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#BlockContext"><span class="hs-identifier hs-type">BlockContext</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-215"></span><span>                  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Dataflow.Label.html#LabelSet"><span class="hs-identifier hs-type">LabelSet</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../containers/src/Data.Map.Internal.html#Map"><span class="hs-identifier hs-type">Map.Map</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmTickScope"><span class="hs-identifier hs-type">CmmTickScope</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#BlockContext"><span class="hs-identifier hs-type">BlockContext</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-216"></span><span>        </span><span id="local-6989586621681029071"><span class="annot"><span class="annottext">walkBlock :: RawCmmDecl
-&gt; [Block CmmNode C C]
-&gt; (LabelSet, Map CmmTickScope [BlockContext])
-&gt; (LabelSet, Map CmmTickScope [BlockContext])
</span><a href="#local-6989586621681029071"><span class="hs-identifier hs-var hs-var">walkBlock</span></a></span></span><span> </span><span class="annot"><span class="annottext">RawCmmDecl
</span><span class="hs-identifier">_</span></span><span>   </span><span class="hs-special">[</span><span class="hs-special">]</span><span>             </span><span id="local-6989586621681029064"><span class="annot"><span class="annottext">(LabelSet, Map CmmTickScope [BlockContext])
</span><a href="#local-6989586621681029064"><span class="hs-identifier hs-var">c</span></a></span></span><span>            </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(LabelSet, Map CmmTickScope [BlockContext])
</span><a href="#local-6989586621681029064"><span class="hs-identifier hs-var">c</span></a></span><span>
</span><span id="line-217"></span><span>        </span><span class="annot"><a href="#local-6989586621681029071"><span class="hs-identifier hs-var">walkBlock</span></a></span><span> </span><span id="local-6989586621681029063"><span class="annot"><span class="annottext">RawCmmDecl
</span><a href="#local-6989586621681029063"><span class="hs-identifier hs-var">prc</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621681029062"><span class="annot"><span class="annottext">Block CmmNode C C
</span><a href="#local-6989586621681029062"><span class="hs-identifier hs-var">block</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621681029061"><span class="annot"><span class="annottext">[Block CmmNode C C]
</span><a href="#local-6989586621681029061"><span class="hs-identifier hs-var">blocks</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681029060"><span class="annot"><span class="annottext">LabelSet
</span><a href="#local-6989586621681029060"><span class="hs-identifier hs-var">visited</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681029059"><span class="annot"><span class="annottext">Map CmmTickScope [BlockContext]
</span><a href="#local-6989586621681029059"><span class="hs-identifier hs-var">m</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-218"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">ElemOf LabelSet
Label
</span><a href="#local-6989586621681029058"><span class="hs-identifier hs-var">lbl</span></a></span><span> </span><span class="annot"><span class="annottext">ElemOf LabelSet -&gt; LabelSet -&gt; Bool
forall set. IsSet set =&gt; ElemOf set -&gt; set -&gt; Bool
</span><a href="GHC.Cmm.Dataflow.Collections.html#setMember"><span class="hs-operator hs-var">`setMember`</span></a></span><span> </span><span class="annot"><span class="annottext">LabelSet
</span><a href="#local-6989586621681029060"><span class="hs-identifier hs-var">visited</span></a></span><span>
</span><span id="line-219"></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RawCmmDecl
-&gt; [Block CmmNode C C]
-&gt; (LabelSet, Map CmmTickScope [BlockContext])
-&gt; (LabelSet, Map CmmTickScope [BlockContext])
</span><a href="#local-6989586621681029071"><span class="hs-identifier hs-var">walkBlock</span></a></span><span> </span><span class="annot"><span class="annottext">RawCmmDecl
</span><a href="#local-6989586621681029063"><span class="hs-identifier hs-var">prc</span></a></span><span> </span><span class="annot"><span class="annottext">[Block CmmNode C C]
</span><a href="#local-6989586621681029061"><span class="hs-identifier hs-var">blocks</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LabelSet
</span><a href="#local-6989586621681029060"><span class="hs-identifier hs-var">visited</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Map CmmTickScope [BlockContext]
</span><a href="#local-6989586621681029059"><span class="hs-identifier hs-var">m</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-220"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-221"></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RawCmmDecl
-&gt; [Block CmmNode C C]
-&gt; (LabelSet, Map CmmTickScope [BlockContext])
-&gt; (LabelSet, Map CmmTickScope [BlockContext])
</span><a href="#local-6989586621681029071"><span class="hs-identifier hs-var">walkBlock</span></a></span><span> </span><span class="annot"><span class="annottext">RawCmmDecl
</span><a href="#local-6989586621681029063"><span class="hs-identifier hs-var">prc</span></a></span><span> </span><span class="annot"><span class="annottext">[Block CmmNode C C]
</span><a href="#local-6989586621681029061"><span class="hs-identifier hs-var">blocks</span></a></span><span> </span><span class="annot"><span class="annottext">((LabelSet, Map CmmTickScope [BlockContext])
 -&gt; (LabelSet, Map CmmTickScope [BlockContext]))
-&gt; (LabelSet, Map CmmTickScope [BlockContext])
-&gt; (LabelSet, Map CmmTickScope [BlockContext])
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-222"></span><span>            </span><span class="annot"><span class="annottext">RawCmmDecl
-&gt; [Block CmmNode C C]
-&gt; (LabelSet, Map CmmTickScope [BlockContext])
-&gt; (LabelSet, Map CmmTickScope [BlockContext])
</span><a href="#local-6989586621681029071"><span class="hs-identifier hs-var">walkBlock</span></a></span><span> </span><span class="annot"><span class="annottext">RawCmmDecl
</span><a href="#local-6989586621681029063"><span class="hs-identifier hs-var">prc</span></a></span><span> </span><span class="annot"><span class="annottext">[Block CmmNode C C]
</span><a href="#local-6989586621681029056"><span class="hs-identifier hs-var">succs</span></a></span><span>
</span><span id="line-223"></span><span>              </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ElemOf LabelSet
Label
</span><a href="#local-6989586621681029058"><span class="hs-identifier hs-var">lbl</span></a></span><span> </span><span class="annot"><span class="annottext">ElemOf LabelSet -&gt; LabelSet -&gt; LabelSet
forall set. IsSet set =&gt; ElemOf set -&gt; set -&gt; set
</span><a href="GHC.Cmm.Dataflow.Collections.html#setInsert"><span class="hs-operator hs-var">`setInsert`</span></a></span><span> </span><span class="annot"><span class="annottext">LabelSet
</span><a href="#local-6989586621681029060"><span class="hs-identifier hs-var">visited</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-224"></span><span>               </span><span class="annot"><span class="annottext">CmmTickScope
-&gt; BlockContext
-&gt; Map CmmTickScope [BlockContext]
-&gt; Map CmmTickScope [BlockContext]
forall k a. Ord k =&gt; k -&gt; a -&gt; Map k [a] -&gt; Map k [a]
</span><a href="GHC.Cmm.DebugBlock.html#insertMulti"><span class="hs-identifier hs-var">insertMulti</span></a></span><span> </span><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621681029054"><span class="hs-identifier hs-var">scope</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Block CmmNode C C
</span><a href="#local-6989586621681029062"><span class="hs-identifier hs-var">block</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">RawCmmDecl
</span><a href="#local-6989586621681029063"><span class="hs-identifier hs-var">prc</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Map CmmTickScope [BlockContext]
</span><a href="#local-6989586621681029059"><span class="hs-identifier hs-var">m</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-225"></span><span>          </span><span class="hs-keyword">where</span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmEntry"><span class="hs-identifier hs-type">CmmEntry</span></a></span><span> </span><span id="local-6989586621681029058"><span class="annot"><span class="annottext">Label
</span><a href="#local-6989586621681029058"><span class="hs-identifier hs-var">lbl</span></a></span></span><span> </span><span id="local-6989586621681029054"><span class="annot"><span class="annottext">CmmTickScope
</span><a href="#local-6989586621681029054"><span class="hs-identifier hs-var">scope</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Block CmmNode C C -&gt; CmmNode C O
forall (n :: Extensibility -&gt; Extensibility -&gt; *)
       (x :: Extensibility).
Block n C x -&gt; n C O
</span><a href="GHC.Cmm.Dataflow.Block.html#firstNode"><span class="hs-identifier hs-var">firstNode</span></a></span><span> </span><span class="annot"><span class="annottext">Block CmmNode C C
</span><a href="#local-6989586621681029062"><span class="hs-identifier hs-var">block</span></a></span><span>
</span><span id="line-226"></span><span>                </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#CmmProc"><span class="hs-identifier hs-type">CmmProc</span></a></span><span> </span><span class="annot"><span class="annottext">LabelMap RawCmmStatics
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">[GlobalReg]
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681029049"><span class="annot"><span class="annottext">GenCmmGraph CmmNode
</span><a href="#local-6989586621681029049"><span class="hs-identifier hs-var">graph</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RawCmmDecl
</span><a href="#local-6989586621681029063"><span class="hs-identifier hs-var">prc</span></a></span><span>
</span><span id="line-227"></span><span>                </span><span id="local-6989586621681029056"><span class="annot"><span class="annottext">succs :: [Block CmmNode C C]
</span><a href="#local-6989586621681029056"><span class="hs-identifier hs-var hs-var">succs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Label -&gt; Block CmmNode C C) -&gt; [Label] -&gt; [Block CmmNode C C]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Label -&gt; LabelMap (Block CmmNode C C) -&gt; Block CmmNode C C)
-&gt; LabelMap (Block CmmNode C C) -&gt; Label -&gt; Block CmmNode C C
forall a b c. (a -&gt; b -&gt; c) -&gt; b -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#flip"><span class="hs-identifier hs-var">flip</span></a></span><span> </span><span class="annot"><span class="annottext">Label -&gt; LabelMap (Block CmmNode C C) -&gt; Block CmmNode C C
forall {a}. KeyOf LabelMap -&gt; LabelMap a -&gt; a
</span><a href="#local-6989586621681029067"><span class="hs-identifier hs-var">mapFind</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">GenCmmGraph CmmNode -&gt; LabelMap (Block CmmNode C C)
</span><a href="GHC.Cmm.Utils.html#toBlockMap"><span class="hs-identifier hs-var">toBlockMap</span></a></span><span> </span><span class="annot"><span class="annottext">GenCmmGraph CmmNode
</span><a href="#local-6989586621681029049"><span class="hs-identifier hs-var">graph</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-228"></span><span>                            </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CmmNode O C -&gt; [Label]
forall (thing :: Extensibility -&gt; Extensibility -&gt; *)
       (e :: Extensibility).
NonLocal thing =&gt;
thing e C -&gt; [Label]
</span><a href="GHC.Cmm.Dataflow.Graph.html#successors"><span class="hs-identifier hs-var">successors</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Block CmmNode C C -&gt; CmmNode O C
forall (n :: Extensibility -&gt; Extensibility -&gt; *)
       (x :: Extensibility).
Block n x C -&gt; n O C
</span><a href="GHC.Cmm.Dataflow.Block.html#lastNode"><span class="hs-identifier hs-var">lastNode</span></a></span><span> </span><span class="annot"><span class="annottext">Block CmmNode C C
</span><a href="#local-6989586621681029062"><span class="hs-identifier hs-var">block</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-229"></span><span>        </span><span id="local-6989586621681029067"><span class="annot"><span class="annottext">mapFind :: KeyOf LabelMap -&gt; LabelMap a -&gt; a
</span><a href="#local-6989586621681029067"><span class="hs-identifier hs-var hs-var">mapFind</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; KeyOf LabelMap -&gt; LabelMap a -&gt; a
forall (map :: * -&gt; *) a. IsMap map =&gt; a -&gt; KeyOf map -&gt; map a -&gt; a
</span><a href="GHC.Cmm.Dataflow.Collections.html#mapFindWithDefault"><span class="hs-identifier hs-var">mapFindWithDefault</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; a
forall a. HasCallStack =&gt; String -&gt; a
</span><a href="../../base/src/GHC.Err.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;contextTree: block not found!&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-230"></span><span>
</span><span id="line-231"></span><span id="local-6989586621681029408"><span id="local-6989586621681029409"><span class="annot"><a href="GHC.Cmm.DebugBlock.html#insertMulti"><span class="hs-identifier hs-type">insertMulti</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Ord</span></span><span> </span><span class="annot"><a href="#local-6989586621681029409"><span class="hs-identifier hs-type">k</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621681029409"><span class="hs-identifier hs-type">k</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621681029408"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../containers/src/Data.Map.Internal.html#Map"><span class="hs-identifier hs-type">Map.Map</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681029409"><span class="hs-identifier hs-type">k</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621681029408"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../containers/src/Data.Map.Internal.html#Map"><span class="hs-identifier hs-type">Map.Map</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681029409"><span class="hs-identifier hs-type">k</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621681029408"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span></span></span><span>
</span><span id="line-232"></span><span id="insertMulti"><span class="annot"><span class="annottext">insertMulti :: forall k a. Ord k =&gt; k -&gt; a -&gt; Map k [a] -&gt; Map k [a]
</span><a href="GHC.Cmm.DebugBlock.html#insertMulti"><span class="hs-identifier hs-var hs-var">insertMulti</span></a></span></span><span> </span><span id="local-6989586621681029039"><span class="annot"><span class="annottext">k
</span><a href="#local-6989586621681029039"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span id="local-6989586621681029038"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681029038"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">([a] -&gt; [a] -&gt; [a]) -&gt; k -&gt; [a] -&gt; Map k [a] -&gt; Map k [a]
forall k a. Ord k =&gt; (a -&gt; a -&gt; a) -&gt; k -&gt; a -&gt; Map k a -&gt; Map k a
</span><a href="../../containers/src/Data.Map.Internal.html#insertWith"><span class="hs-identifier hs-var">Map.insertWith</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">([a] -&gt; [a]) -&gt; [a] -&gt; [a] -&gt; [a]
forall a b. a -&gt; b -&gt; a
</span><a href="../../base/src/GHC.Base.html#const"><span class="hs-identifier hs-var">const</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681029038"><span class="hs-identifier hs-var">v</span></a></span><span class="annot"><span class="annottext">a -&gt; [a] -&gt; [a]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">k
</span><a href="#local-6989586621681029039"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681029038"><span class="hs-identifier hs-var">v</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-233"></span><span>
</span><span id="line-234"></span><span id="local-6989586621681029338"><span id="local-6989586621681029339"><span id="local-6989586621681029340"><span class="annot"><a href="GHC.Cmm.DebugBlock.html#cmmDebugLabels"><span class="hs-identifier hs-type">cmmDebugLabels</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621681029340"><span class="hs-identifier hs-type">i</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.html#GenCmmGroup"><span class="hs-identifier hs-type">GenCmmGroup</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681029339"><span class="hs-identifier hs-type">d</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681029338"><span class="hs-identifier hs-type">g</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#ListGraph"><span class="hs-identifier hs-type">ListGraph</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681029340"><span class="hs-identifier hs-type">i</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.Dataflow.Label.html#Label"><span class="hs-identifier hs-type">Label</span></a></span><span class="hs-special">]</span></span></span></span><span>
</span><span id="line-235"></span><span id="cmmDebugLabels"><span class="annot"><span class="annottext">cmmDebugLabels :: forall i d g.
(i -&gt; Bool) -&gt; GenCmmGroup d g (ListGraph i) -&gt; [Label]
</span><a href="GHC.Cmm.DebugBlock.html#cmmDebugLabels"><span class="hs-identifier hs-var hs-var">cmmDebugLabels</span></a></span></span><span> </span><span id="local-6989586621681029033"><span class="annot"><span class="annottext">i -&gt; Bool
</span><a href="#local-6989586621681029033"><span class="hs-identifier hs-var">isMeta</span></a></span></span><span> </span><span id="local-6989586621681029032"><span class="annot"><span class="annottext">GenCmmGroup d g (ListGraph i)
</span><a href="#local-6989586621681029032"><span class="hs-identifier hs-var">nats</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Label] -&gt; [Label] -&gt; [Label]
forall a b. [a] -&gt; b -&gt; b
</span><a href="GHC.Utils.Misc.html#seqList"><span class="hs-identifier hs-var">seqList</span></a></span><span> </span><span class="annot"><span class="annottext">[Label]
</span><a href="#local-6989586621681029031"><span class="hs-identifier hs-var">lbls</span></a></span><span> </span><span class="annot"><span class="annottext">[Label]
</span><a href="#local-6989586621681029031"><span class="hs-identifier hs-var">lbls</span></a></span><span>
</span><span id="line-236"></span><span>  </span><span class="hs-keyword">where</span><span> </span><span class="hs-comment">-- Find order in which procedures will be generated by the</span><span>
</span><span id="line-237"></span><span>        </span><span class="hs-comment">-- back-end (that actually matters for DWARF generation).</span><span>
</span><span id="line-238"></span><span>        </span><span class="hs-comment">--</span><span>
</span><span id="line-239"></span><span>        </span><span class="hs-comment">-- Note that we might encounter blocks that are missing or only</span><span>
</span><span id="line-240"></span><span>        </span><span class="hs-comment">-- consist of meta instructions -- we will declare them missing,</span><span>
</span><span id="line-241"></span><span>        </span><span class="hs-comment">-- which will skip debug data generation without messing up the</span><span>
</span><span id="line-242"></span><span>        </span><span class="hs-comment">-- block hierarchy.</span><span>
</span><span id="line-243"></span><span>        </span><span id="local-6989586621681029031"><span class="annot"><span class="annottext">lbls :: [Label]
</span><a href="#local-6989586621681029031"><span class="hs-identifier hs-var hs-var">lbls</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(GenBasicBlock i -&gt; Label) -&gt; [GenBasicBlock i] -&gt; [Label]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">GenBasicBlock i -&gt; Label
forall i. GenBasicBlock i -&gt; Label
</span><a href="GHC.Cmm.html#blockId"><span class="hs-identifier hs-var">blockId</span></a></span><span> </span><span class="annot"><span class="annottext">([GenBasicBlock i] -&gt; [Label]) -&gt; [GenBasicBlock i] -&gt; [Label]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(GenBasicBlock i -&gt; Bool) -&gt; [GenBasicBlock i] -&gt; [GenBasicBlock i]
forall a. (a -&gt; Bool) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#filter"><span class="hs-identifier hs-var">filter</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="annot"><span class="annottext">(Bool -&gt; Bool)
-&gt; (GenBasicBlock i -&gt; Bool) -&gt; GenBasicBlock i -&gt; Bool
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">GenBasicBlock i -&gt; Bool
</span><a href="#local-6989586621681029028"><span class="hs-identifier hs-var">allMeta</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">([GenBasicBlock i] -&gt; [GenBasicBlock i])
-&gt; [GenBasicBlock i] -&gt; [GenBasicBlock i]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(GenCmmDecl d g (ListGraph i) -&gt; [GenBasicBlock i])
-&gt; GenCmmGroup d g (ListGraph i) -&gt; [GenBasicBlock i]
forall (t :: * -&gt; *) a b. Foldable t =&gt; (a -&gt; [b]) -&gt; t a -&gt; [b]
</span><a href="../../base/src/Data.Foldable.html#concatMap"><span class="hs-identifier hs-var">concatMap</span></a></span><span> </span><span class="annot"><span class="annottext">GenCmmDecl d g (ListGraph i) -&gt; [GenBasicBlock i]
forall {d} {h} {i}.
GenCmmDecl d h (ListGraph i) -&gt; [GenBasicBlock i]
</span><a href="#local-6989586621681029027"><span class="hs-identifier hs-var">getBlocks</span></a></span><span> </span><span class="annot"><span class="annottext">GenCmmGroup d g (ListGraph i)
</span><a href="#local-6989586621681029032"><span class="hs-identifier hs-var">nats</span></a></span><span>
</span><span id="line-244"></span><span>        </span><span id="local-6989586621681029027"><span class="annot"><span class="annottext">getBlocks :: GenCmmDecl d h (ListGraph i) -&gt; [GenBasicBlock i]
</span><a href="#local-6989586621681029027"><span class="hs-identifier hs-var hs-var">getBlocks</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#CmmProc"><span class="hs-identifier hs-type">CmmProc</span></a></span><span> </span><span class="annot"><span class="annottext">h
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">[GlobalReg]
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#ListGraph"><span class="hs-identifier hs-type">ListGraph</span></a></span><span> </span><span id="local-6989586621681029025"><span class="annot"><span class="annottext">[GenBasicBlock i]
</span><a href="#local-6989586621681029025"><span class="hs-identifier hs-var">bs</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[GenBasicBlock i]
</span><a href="#local-6989586621681029025"><span class="hs-identifier hs-var">bs</span></a></span><span>
</span><span id="line-245"></span><span>        </span><span class="annot"><a href="#local-6989586621681029027"><span class="hs-identifier hs-var">getBlocks</span></a></span><span> </span><span id="local-6989586621681029024"><span class="annot"><span class="annottext">GenCmmDecl d h (ListGraph i)
</span><a href="#local-6989586621681029024"><span class="hs-identifier hs-var">_other</span></a></span></span><span>                         </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-246"></span><span>        </span><span id="local-6989586621681029028"><span class="annot"><span class="annottext">allMeta :: GenBasicBlock i -&gt; Bool
</span><a href="#local-6989586621681029028"><span class="hs-identifier hs-var hs-var">allMeta</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#BasicBlock"><span class="hs-identifier hs-type">BasicBlock</span></a></span><span> </span><span class="annot"><span class="annottext">Label
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681029022"><span class="annot"><span class="annottext">[i]
</span><a href="#local-6989586621681029022"><span class="hs-identifier hs-var">instrs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(i -&gt; Bool) -&gt; [i] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; (a -&gt; Bool) -&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#all"><span class="hs-identifier hs-var">all</span></a></span><span> </span><span class="annot"><span class="annottext">i -&gt; Bool
</span><a href="#local-6989586621681029033"><span class="hs-identifier hs-var">isMeta</span></a></span><span> </span><span class="annot"><span class="annottext">[i]
</span><a href="#local-6989586621681029022"><span class="hs-identifier hs-var">instrs</span></a></span><span>
</span><span id="line-247"></span><span>
</span><span id="line-248"></span><span class="hs-comment">-- | Sets position and unwind table fields in the debug block tree according to</span><span>
</span><span id="line-249"></span><span class="hs-comment">-- native generated code.</span><span>
</span><span id="line-250"></span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#cmmDebugLink"><span class="hs-identifier hs-type">cmmDebugLink</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.Dataflow.Label.html#Label"><span class="hs-identifier hs-type">Label</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Label.html#LabelMap"><span class="hs-identifier hs-type">LabelMap</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#UnwindPoint"><span class="hs-identifier hs-type">UnwindPoint</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-251"></span><span>             </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#DebugBlock"><span class="hs-identifier hs-type">DebugBlock</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#DebugBlock"><span class="hs-identifier hs-type">DebugBlock</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-252"></span><span id="cmmDebugLink"><span class="annot"><span class="annottext">cmmDebugLink :: [Label] -&gt; LabelMap [UnwindPoint] -&gt; [DebugBlock] -&gt; [DebugBlock]
</span><a href="GHC.Cmm.DebugBlock.html#cmmDebugLink"><span class="hs-identifier hs-var hs-var">cmmDebugLink</span></a></span></span><span> </span><span id="local-6989586621681029020"><span class="annot"><span class="annottext">[Label]
</span><a href="#local-6989586621681029020"><span class="hs-identifier hs-var">labels</span></a></span></span><span> </span><span id="local-6989586621681029019"><span class="annot"><span class="annottext">LabelMap [UnwindPoint]
</span><a href="#local-6989586621681029019"><span class="hs-identifier hs-var">unwindPts</span></a></span></span><span> </span><span id="local-6989586621681029018"><span class="annot"><span class="annottext">[DebugBlock]
</span><a href="#local-6989586621681029018"><span class="hs-identifier hs-var">blocks</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(DebugBlock -&gt; DebugBlock) -&gt; [DebugBlock] -&gt; [DebugBlock]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">DebugBlock -&gt; DebugBlock
</span><a href="#local-6989586621681029017"><span class="hs-identifier hs-var">link</span></a></span><span> </span><span class="annot"><span class="annottext">[DebugBlock]
</span><a href="#local-6989586621681029018"><span class="hs-identifier hs-var">blocks</span></a></span><span>
</span><span id="line-253"></span><span>  </span><span class="hs-keyword">where</span><span> </span><span class="annot"><a href="#local-6989586621681029016"><span class="hs-identifier hs-type">blockPos</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Label.html#LabelMap"><span class="hs-identifier hs-type">LabelMap</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>
</span><span id="line-254"></span><span>        </span><span id="local-6989586621681029016"><span class="annot"><span class="annottext">blockPos :: LabelMap Int
</span><a href="#local-6989586621681029016"><span class="hs-identifier hs-var hs-var">blockPos</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[(KeyOf LabelMap, Int)] -&gt; LabelMap Int
forall (map :: * -&gt; *) a. IsMap map =&gt; [(KeyOf map, a)] -&gt; map a
</span><a href="GHC.Cmm.Dataflow.Collections.html#mapFromList"><span class="hs-identifier hs-var">mapFromList</span></a></span><span> </span><span class="annot"><span class="annottext">([(KeyOf LabelMap, Int)] -&gt; LabelMap Int)
-&gt; [(KeyOf LabelMap, Int)] -&gt; LabelMap Int
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">([Label] -&gt; [Int] -&gt; [(Label, Int)])
-&gt; [Int] -&gt; [Label] -&gt; [(Label, Int)]
forall a b c. (a -&gt; b -&gt; c) -&gt; b -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#flip"><span class="hs-identifier hs-var">flip</span></a></span><span> </span><span class="annot"><span class="annottext">[Label] -&gt; [Int] -&gt; [(Label, Int)]
forall a b. [a] -&gt; [b] -&gt; [(a, b)]
</span><a href="../../base/src/GHC.List.html#zip"><span class="hs-identifier hs-var">zip</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-glyph">..</span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">[Label]
</span><a href="#local-6989586621681029020"><span class="hs-identifier hs-var">labels</span></a></span><span>
</span><span id="line-255"></span><span>        </span><span id="local-6989586621681029017"><span class="annot"><span class="annottext">link :: DebugBlock -&gt; DebugBlock
</span><a href="#local-6989586621681029017"><span class="hs-identifier hs-var hs-var">link</span></a></span></span><span> </span><span id="local-6989586621681029014"><span class="annot"><span class="annottext">DebugBlock
</span><a href="#local-6989586621681029014"><span class="hs-identifier hs-var">block</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DebugBlock
</span><a href="#local-6989586621681029014"><span class="hs-identifier hs-var">block</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">dblPosition :: Maybe Int
</span><a href="GHC.Cmm.DebugBlock.html#dblPosition"><span class="hs-identifier hs-var">dblPosition</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">KeyOf LabelMap -&gt; LabelMap Int -&gt; Maybe Int
forall (map :: * -&gt; *) a.
IsMap map =&gt;
KeyOf map -&gt; map a -&gt; Maybe a
</span><a href="GHC.Cmm.Dataflow.Collections.html#mapLookup"><span class="hs-identifier hs-var">mapLookup</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DebugBlock -&gt; Label
</span><a href="GHC.Cmm.DebugBlock.html#dblLabel"><span class="hs-identifier hs-var hs-var">dblLabel</span></a></span><span> </span><span class="annot"><span class="annottext">DebugBlock
</span><a href="#local-6989586621681029014"><span class="hs-identifier hs-var">block</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">LabelMap Int
</span><a href="#local-6989586621681029016"><span class="hs-identifier hs-var">blockPos</span></a></span><span>
</span><span id="line-256"></span><span>                           </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">dblBlocks :: [DebugBlock]
</span><a href="GHC.Cmm.DebugBlock.html#dblBlocks"><span class="hs-identifier hs-var">dblBlocks</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(DebugBlock -&gt; DebugBlock) -&gt; [DebugBlock] -&gt; [DebugBlock]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">DebugBlock -&gt; DebugBlock
</span><a href="#local-6989586621681029017"><span class="hs-identifier hs-var">link</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DebugBlock -&gt; [DebugBlock]
</span><a href="GHC.Cmm.DebugBlock.html#dblBlocks"><span class="hs-identifier hs-var hs-var">dblBlocks</span></a></span><span> </span><span class="annot"><span class="annottext">DebugBlock
</span><a href="#local-6989586621681029014"><span class="hs-identifier hs-var">block</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-257"></span><span>                           </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">dblUnwind :: [UnwindPoint]
</span><a href="GHC.Cmm.DebugBlock.html#dblUnwind"><span class="hs-identifier hs-var">dblUnwind</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[UnwindPoint] -&gt; Maybe [UnwindPoint] -&gt; [UnwindPoint]
forall a. a -&gt; Maybe a -&gt; a
</span><a href="../../base/src/Data.Maybe.html#fromMaybe"><span class="hs-identifier hs-var">fromMaybe</span></a></span><span> </span><span class="annot"><span class="annottext">[UnwindPoint]
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">mempty</span></a></span><span>
</span><span id="line-258"></span><span>                                         </span><span class="annot"><span class="annottext">(Maybe [UnwindPoint] -&gt; [UnwindPoint])
-&gt; Maybe [UnwindPoint] -&gt; [UnwindPoint]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">KeyOf LabelMap -&gt; LabelMap [UnwindPoint] -&gt; Maybe [UnwindPoint]
forall (map :: * -&gt; *) a.
IsMap map =&gt;
KeyOf map -&gt; map a -&gt; Maybe a
</span><a href="GHC.Cmm.Dataflow.Collections.html#mapLookup"><span class="hs-identifier hs-var">mapLookup</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DebugBlock -&gt; Label
</span><a href="GHC.Cmm.DebugBlock.html#dblLabel"><span class="hs-identifier hs-var hs-var">dblLabel</span></a></span><span> </span><span class="annot"><span class="annottext">DebugBlock
</span><a href="#local-6989586621681029014"><span class="hs-identifier hs-var">block</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">LabelMap [UnwindPoint]
</span><a href="#local-6989586621681029019"><span class="hs-identifier hs-var">unwindPts</span></a></span><span>
</span><span id="line-259"></span><span>                           </span><span class="hs-special">}</span><span>
</span><span id="line-260"></span><span>
</span><span id="line-261"></span><span class="hs-comment">-- | Converts debug blocks into a label map for easier lookups</span><span>
</span><span id="line-262"></span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#debugToMap"><span class="hs-identifier hs-type">debugToMap</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#DebugBlock"><span class="hs-identifier hs-type">DebugBlock</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Label.html#LabelMap"><span class="hs-identifier hs-type">LabelMap</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#DebugBlock"><span class="hs-identifier hs-type">DebugBlock</span></a></span><span>
</span><span id="line-263"></span><span id="debugToMap"><span class="annot"><span class="annottext">debugToMap :: [DebugBlock] -&gt; LabelMap DebugBlock
</span><a href="GHC.Cmm.DebugBlock.html#debugToMap"><span class="hs-identifier hs-var hs-var">debugToMap</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[LabelMap DebugBlock] -&gt; LabelMap DebugBlock
forall (map :: * -&gt; *) a. IsMap map =&gt; [map a] -&gt; map a
</span><a href="GHC.Cmm.Dataflow.Collections.html#mapUnions"><span class="hs-identifier hs-var">mapUnions</span></a></span><span> </span><span class="annot"><span class="annottext">([LabelMap DebugBlock] -&gt; LabelMap DebugBlock)
-&gt; ([DebugBlock] -&gt; [LabelMap DebugBlock])
-&gt; [DebugBlock]
-&gt; LabelMap DebugBlock
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(DebugBlock -&gt; LabelMap DebugBlock)
-&gt; [DebugBlock] -&gt; [LabelMap DebugBlock]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">DebugBlock -&gt; LabelMap DebugBlock
forall {map :: * -&gt; *}.
(IsMap map, KeyOf map ~ Label) =&gt;
DebugBlock -&gt; map DebugBlock
</span><a href="#local-6989586621681029012"><span class="hs-identifier hs-var">go</span></a></span><span>
</span><span id="line-264"></span><span>   </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621681029012"><span class="annot"><span class="annottext">go :: DebugBlock -&gt; map DebugBlock
</span><a href="#local-6989586621681029012"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span id="local-6989586621681029004"><span class="annot"><span class="annottext">DebugBlock
</span><a href="#local-6989586621681029004"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">KeyOf map -&gt; DebugBlock -&gt; map DebugBlock -&gt; map DebugBlock
forall (map :: * -&gt; *) a.
IsMap map =&gt;
KeyOf map -&gt; a -&gt; map a -&gt; map a
</span><a href="GHC.Cmm.Dataflow.Collections.html#mapInsert"><span class="hs-identifier hs-var">mapInsert</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DebugBlock -&gt; Label
</span><a href="GHC.Cmm.DebugBlock.html#dblLabel"><span class="hs-identifier hs-var hs-var">dblLabel</span></a></span><span> </span><span class="annot"><span class="annottext">DebugBlock
</span><a href="#local-6989586621681029004"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">DebugBlock
</span><a href="#local-6989586621681029004"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">(map DebugBlock -&gt; map DebugBlock)
-&gt; map DebugBlock -&gt; map DebugBlock
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[map DebugBlock] -&gt; map DebugBlock
forall (map :: * -&gt; *) a. IsMap map =&gt; [map a] -&gt; map a
</span><a href="GHC.Cmm.Dataflow.Collections.html#mapUnions"><span class="hs-identifier hs-var">mapUnions</span></a></span><span> </span><span class="annot"><span class="annottext">([map DebugBlock] -&gt; map DebugBlock)
-&gt; [map DebugBlock] -&gt; map DebugBlock
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(DebugBlock -&gt; map DebugBlock) -&gt; [DebugBlock] -&gt; [map DebugBlock]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">DebugBlock -&gt; map DebugBlock
</span><a href="#local-6989586621681029012"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DebugBlock -&gt; [DebugBlock]
</span><a href="GHC.Cmm.DebugBlock.html#dblBlocks"><span class="hs-identifier hs-var hs-var">dblBlocks</span></a></span><span> </span><span class="annot"><span class="annottext">DebugBlock
</span><a href="#local-6989586621681029004"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-265"></span><span>
</span><span id="line-266"></span><span class="hs-comment">{-
Note [What is this unwinding business?]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Unwinding tables are a variety of debugging information used by debugging tools
to reconstruct the execution history of a program at runtime. These tables
consist of sets of &quot;instructions&quot;, one set for every instruction in the program,
which describe how to reconstruct the state of the machine at the point where
the current procedure was called. For instance, consider the following annotated
pseudo-code,

  a_fun:
    add rsp, 8            -- unwind: rsp = rsp - 8
    mov rax, 1            -- unwind: rax = unknown
    call another_block
    sub rsp, 8            -- unwind: rsp = rsp

We see that attached to each instruction there is an &quot;unwind&quot; annotation, which
provides a relationship between each updated register and its value at the
time of entry to a_fun. This is the sort of information that allows gdb to give
you a stack backtrace given the execution state of your program. This
unwinding information is captured in various ways by various debug information
formats; in the case of DWARF (the only format supported by GHC) it is known as
Call Frame Information (CFI) and can be found in the .debug.frames section of
your object files.

Currently we only bother to produce unwinding information for registers which
are necessary to reconstruct flow-of-execution. On x86_64 this includes $rbp
(which is the STG stack pointer) and $rsp (the C stack pointer).

Let's consider how GHC would annotate a C-- program with unwinding information
with a typical C-- procedure as would come from the STG-to-Cmm code generator,

  entry()
     { c2fe:
           v :: P64 = R2;
           if ((Sp + 8) - 32 &lt; SpLim) (likely: False) goto c2ff; else goto c2fg;
       c2ff:
           R2 = v :: P64;
           R1 = test_closure;
           call (stg_gc_fun)(R2, R1) args: 8, res: 0, upd: 8;
       c2fg:
           I64[Sp - 8] = c2dD;
           R1 = v :: P64;
           Sp = Sp - 8;          // Sp updated here
           if (R1 &amp; 7 != 0) goto c2dD; else goto c2dE;
       c2dE:
           call (I64[R1])(R1) returns to c2dD, args: 8, res: 8, upd: 8;
       c2dD:
           w :: P64 = R1;
           Hp = Hp + 48;
           if (Hp &gt; HpLim) (likely: False) goto c2fj; else goto c2fi;
       ...
  },

Let's consider how this procedure will be decorated with unwind information
(largely by GHC.Cmm.LayoutStack). Naturally, when we enter the procedure `entry` the
value of Sp is no different from what it was at its call site. Therefore we will
add an `unwind` statement saying this at the beginning of its unwind-annotated
code,

  entry()
     { c2fe:
           unwind Sp = Just Sp + 0;
           v :: P64 = R2;
           if ((Sp + 8) - 32 &lt; SpLim) (likely: False) goto c2ff; else goto c2fg;

After c2fe we may pass to either c2ff or c2fg; let's first consider the
former. In this case there is nothing in particular that we need to do other
than reiterate what we already know about Sp,

       c2ff:
           unwind Sp = Just Sp + 0;
           R2 = v :: P64;
           R1 = test_closure;
           call (stg_gc_fun)(R2, R1) args: 8, res: 0, upd: 8;

In contrast, c2fg updates Sp midway through its body. To ensure that unwinding
can happen correctly after this point we must include an unwind statement there,
in addition to the usual beginning-of-block statement,

       c2fg:
           unwind Sp = Just Sp + 0;
           I64[Sp - 8] = c2dD;
           R1 = v :: P64;
           Sp = Sp - 8;
           unwind Sp = Just Sp + 8;
           if (R1 &amp; 7 != 0) goto c2dD; else goto c2dE;

The remaining blocks are simple,

       c2dE:
           unwind Sp = Just Sp + 8;
           call (I64[R1])(R1) returns to c2dD, args: 8, res: 8, upd: 8;
       c2dD:
           unwind Sp = Just Sp + 8;
           w :: P64 = R1;
           Hp = Hp + 48;
           if (Hp &gt; HpLim) (likely: False) goto c2fj; else goto c2fi;
       ...
  },


The flow of unwinding information through the compiler is a bit convoluted:

 * C-- begins life in StgToCmm without any unwind information. This is because we
   haven't actually done any register assignment or stack layout yet, so there
   is no need for unwind information.

 * GHC.Cmm.LayoutStack figures out how to layout each procedure's stack, and produces
   appropriate unwinding nodes for each adjustment of the STG Sp register.

 * The unwind nodes are carried through the sinking pass. Currently this is
   guaranteed not to invalidate unwind information since it won't touch stores
   to Sp, but this will need revisiting if CmmSink gets smarter in the future.

 * Eventually we make it to the native code generator backend which can then
   preserve the unwind nodes in its machine-specific instructions. In so doing
   the backend can also modify or add unwinding information; this is necessary,
   for instance, in the case of x86-64, where adjustment of $rsp may be
   necessary during calls to native foreign code due to the native calling
   convention.

 * The NCG then retrieves the final unwinding table for each block from the
   backend with extractUnwindPoints.

 * This unwind information is converted to DebugBlocks by Debug.cmmDebugGen

 * These DebugBlocks are then converted to, e.g., DWARF unwinding tables
   (by the Dwarf module) and emitted in the final object.

See also:
  Note [Unwinding information in the NCG] in &quot;GHC.CmmToAsm&quot;,
  Note [Unwind pseudo-instruction in Cmm],
  Note [Debugging DWARF unwinding info].


Note [Debugging DWARF unwinding info]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

For debugging generated unwinding info I've found it most useful to dump the
disassembled binary with objdump -D and dump the debug info with
readelf --debug-dump=frames-interp.

You should get something like this:

  0000000000000010 &lt;stg_catch_frame_info&gt;:
    10:   48 83 c5 18             add    $0x18,%rbp
    14:   ff 65 00                jmpq   *0x0(%rbp)

and:

  Contents of the .debug_frame section:

  00000000 0000000000000014 ffffffff CIE &quot;&quot; cf=1 df=-8 ra=16
     LOC           CFA      rbp   rsp   ra
  0000000000000000 rbp+0    v+0   s     c+0

  00000018 0000000000000024 00000000 FDE cie=00000000 pc=000000000000000f..0000000000000017
     LOC           CFA      rbp   rsp   ra
  000000000000000f rbp+0    v+0   s     c+0
  000000000000000f rbp+24   v+0   s     c+0

To read it http://www.dwarfstd.org/doc/dwarf-2.0.0.pdf has a nice example in
Appendix 5 (page 101 of the pdf) and more details in the relevant section.

The key thing to keep in mind is that the value at LOC is the value from
*before* the instruction at LOC executes. In other words it answers the
question: if my $rip is at LOC, how do I get the relevant values given the
values obtained through unwinding so far.

If the readelf --debug-dump=frames-interp output looks wrong, it may also be
useful to look at readelf --debug-dump=frames, which is closer to the
information that GHC generated.

It's also useful to dump the relevant Cmm with -ddump-cmm -ddump-opt-cmm
-ddump-cmm-proc -ddump-cmm-verbose. Note [Unwind pseudo-instruction in Cmm]
explains how to interpret it.

Inside gdb there are a couple useful commands for inspecting frames.
For example:

  gdb&gt; info frame &lt;num&gt;

It shows the values of registers obtained through unwinding.

Another useful thing to try when debugging the DWARF unwinding is to enable
extra debugging output in GDB:

  gdb&gt; set debug frame 1

This makes GDB produce a trace of its internal workings. Having gone this far,
it's just a tiny step to run GDB in GDB. Make sure you install debugging
symbols for gdb if you obtain it through a package manager.

Keep in mind that the current release of GDB has an instruction pointer handling
heuristic that works well for C-like languages, but doesn't always work for
Haskell. See Note [Info Offset] in &quot;GHC.CmmToAsm.Dwarf.Types&quot; for more details.

Note [Unwind pseudo-instruction in Cmm]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

One of the possible CmmNodes is a CmmUnwind pseudo-instruction. It doesn't
generate any assembly, but controls what DWARF unwinding information gets
generated.

It's important to understand what ranges of code the unwind pseudo-instruction
refers to.
For a sequence of CmmNodes like:

  A // starts at addr X and ends at addr Y-1
  unwind Sp = Just Sp + 16;
  B // starts at addr Y and ends at addr Z

the unwind statement reflects the state after A has executed, but before B
has executed. If you consult the Note [Debugging DWARF unwinding info], the
LOC this information will end up in is Y.
-}</span><span>
</span><span id="line-484"></span><span>
</span><span id="line-485"></span><span class="hs-comment">-- | A label associated with an 'UnwindTable'</span><span>
</span><span id="line-486"></span><span class="hs-keyword">data</span><span> </span><span id="UnwindPoint"><span class="annot"><a href="GHC.Cmm.DebugBlock.html#UnwindPoint"><span class="hs-identifier hs-var">UnwindPoint</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="UnwindPoint"><span class="annot"><a href="GHC.Cmm.DebugBlock.html#UnwindPoint"><span class="hs-identifier hs-var">UnwindPoint</span></a></span></span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="GHC.Cmm.CLabel.html#CLabel"><span class="hs-identifier hs-type">CLabel</span></a></span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#UnwindTable"><span class="hs-identifier hs-type">UnwindTable</span></a></span><span>
</span><span id="line-487"></span><span>
</span><span id="line-488"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621681028999"><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#UnwindPoint"><span class="hs-identifier hs-type">UnwindPoint</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-489"></span><span>  </span><span id="local-6989586621681028992"><span class="annot"><span class="annottext">ppr :: UnwindPoint -&gt; SDoc
</span><a href="#local-6989586621681028992"><span class="hs-identifier hs-var hs-var hs-var hs-var">ppr</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#UnwindPoint"><span class="hs-identifier hs-type">UnwindPoint</span></a></span><span> </span><span id="local-6989586621681028991"><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681028991"><span class="hs-identifier hs-var">lbl</span></a></span></span><span> </span><span id="local-6989586621681028990"><span class="annot"><span class="annottext">UnwindTable
</span><a href="#local-6989586621681028990"><span class="hs-identifier hs-var">uws</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-490"></span><span>      </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#braces"><span class="hs-identifier hs-var">braces</span></a></span><span> </span><span class="annot"><span class="annottext">(SDoc -&gt; SDoc) -&gt; SDoc -&gt; SDoc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681028991"><span class="hs-identifier hs-var">lbl</span></a></span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#colon"><span class="hs-identifier hs-var">colon</span></a></span><span>
</span><span id="line-491"></span><span>      </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#hsep"><span class="hs-identifier hs-var">hsep</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SDoc -&gt; [SDoc] -&gt; [SDoc]
</span><a href="GHC.Utils.Outputable.html#punctuate"><span class="hs-identifier hs-var">punctuate</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#comma"><span class="hs-identifier hs-var">comma</span></a></span><span> </span><span class="annot"><span class="annottext">([SDoc] -&gt; [SDoc]) -&gt; [SDoc] -&gt; [SDoc]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">((GlobalReg, Maybe UnwindExpr) -&gt; SDoc)
-&gt; [(GlobalReg, Maybe UnwindExpr)] -&gt; [SDoc]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">(GlobalReg, Maybe UnwindExpr) -&gt; SDoc
forall {a} {a}. (Outputable a, Outputable a) =&gt; (a, a) -&gt; SDoc
</span><a href="#local-6989586621681028984"><span class="hs-identifier hs-var">pprUw</span></a></span><span> </span><span class="annot"><span class="annottext">([(GlobalReg, Maybe UnwindExpr)] -&gt; [SDoc])
-&gt; [(GlobalReg, Maybe UnwindExpr)] -&gt; [SDoc]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">UnwindTable -&gt; [(GlobalReg, Maybe UnwindExpr)]
forall k a. Map k a -&gt; [(k, a)]
</span><a href="../../containers/src/Data.Map.Internal.html#toList"><span class="hs-identifier hs-var">Map.toList</span></a></span><span> </span><span class="annot"><span class="annottext">UnwindTable
</span><a href="#local-6989586621681028990"><span class="hs-identifier hs-var">uws</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-492"></span><span>    </span><span class="hs-keyword">where</span><span>
</span><span id="line-493"></span><span>      </span><span id="local-6989586621681028984"><span class="annot"><span class="annottext">pprUw :: (a, a) -&gt; SDoc
</span><a href="#local-6989586621681028984"><span class="hs-identifier hs-var hs-var">pprUw</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621681028978"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681028978"><span class="hs-identifier hs-var">g</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681028977"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681028977"><span class="hs-identifier hs-var">expr</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681028978"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#char"><span class="hs-identifier hs-var">char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'='</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681028977"><span class="hs-identifier hs-var">expr</span></a></span><span>
</span><span id="line-494"></span><span>
</span><span id="line-495"></span><span class="hs-comment">-- | Maps registers to expressions that yield their &quot;old&quot; values</span><span>
</span><span id="line-496"></span><span class="hs-comment">-- further up the stack. Most interesting for the stack pointer @Sp@,</span><span>
</span><span id="line-497"></span><span class="hs-comment">-- but might be useful to document saved registers, too. Note that a</span><span>
</span><span id="line-498"></span><span class="hs-comment">-- register's value will be 'Nothing' when the register's previous</span><span>
</span><span id="line-499"></span><span class="hs-comment">-- value cannot be reconstructed.</span><span>
</span><span id="line-500"></span><span class="hs-keyword">type</span><span> </span><span id="UnwindTable"><span class="annot"><a href="GHC.Cmm.DebugBlock.html#UnwindTable"><span class="hs-identifier hs-var">UnwindTable</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="../../containers/src/Data.Map.Internal.html#Map"><span class="hs-identifier hs-type">Map.Map</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#GlobalReg"><span class="hs-identifier hs-type">GlobalReg</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#UnwindExpr"><span class="hs-identifier hs-type">UnwindExpr</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-501"></span><span>
</span><span id="line-502"></span><span class="hs-comment">-- | Expressions, used for unwind information</span><span>
</span><span id="line-503"></span><span class="hs-keyword">data</span><span> </span><span id="UnwindExpr"><span class="annot"><a href="GHC.Cmm.DebugBlock.html#UnwindExpr"><span class="hs-identifier hs-var">UnwindExpr</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="UwConst"><span class="annot"><a href="GHC.Cmm.DebugBlock.html#UwConst"><span class="hs-identifier hs-var">UwConst</span></a></span></span><span> </span><span class="hs-glyph">!</span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>                  </span><span class="hs-comment">-- ^ literal value</span><span>
</span><span id="line-504"></span><span>                </span><span class="hs-glyph">|</span><span> </span><span id="UwReg"><span class="annot"><a href="GHC.Cmm.DebugBlock.html#UwReg"><span class="hs-identifier hs-var">UwReg</span></a></span></span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="GHC.Cmm.Expr.html#GlobalReg"><span class="hs-identifier hs-type">GlobalReg</span></a></span><span> </span><span class="hs-glyph">!</span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>         </span><span class="hs-comment">-- ^ register plus offset</span><span>
</span><span id="line-505"></span><span>                </span><span class="hs-glyph">|</span><span> </span><span id="UwDeref"><span class="annot"><a href="GHC.Cmm.DebugBlock.html#UwDeref"><span class="hs-identifier hs-var">UwDeref</span></a></span></span><span> </span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#UnwindExpr"><span class="hs-identifier hs-type">UnwindExpr</span></a></span><span>            </span><span class="hs-comment">-- ^ pointer dereferencing</span><span>
</span><span id="line-506"></span><span>                </span><span class="hs-glyph">|</span><span> </span><span id="UwLabel"><span class="annot"><a href="GHC.Cmm.DebugBlock.html#UwLabel"><span class="hs-identifier hs-var">UwLabel</span></a></span></span><span> </span><span class="annot"><a href="GHC.Cmm.CLabel.html#CLabel"><span class="hs-identifier hs-type">CLabel</span></a></span><span>
</span><span id="line-507"></span><span>                </span><span class="hs-glyph">|</span><span> </span><span id="UwPlus"><span class="annot"><a href="GHC.Cmm.DebugBlock.html#UwPlus"><span class="hs-identifier hs-var">UwPlus</span></a></span></span><span> </span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#UnwindExpr"><span class="hs-identifier hs-type">UnwindExpr</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#UnwindExpr"><span class="hs-identifier hs-type">UnwindExpr</span></a></span><span>
</span><span id="line-508"></span><span>                </span><span class="hs-glyph">|</span><span> </span><span id="UwMinus"><span class="annot"><a href="GHC.Cmm.DebugBlock.html#UwMinus"><span class="hs-identifier hs-var">UwMinus</span></a></span></span><span> </span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#UnwindExpr"><span class="hs-identifier hs-type">UnwindExpr</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#UnwindExpr"><span class="hs-identifier hs-type">UnwindExpr</span></a></span><span>
</span><span id="line-509"></span><span>                </span><span class="hs-glyph">|</span><span> </span><span id="UwTimes"><span class="annot"><a href="GHC.Cmm.DebugBlock.html#UwTimes"><span class="hs-identifier hs-var">UwTimes</span></a></span></span><span> </span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#UnwindExpr"><span class="hs-identifier hs-type">UnwindExpr</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#UnwindExpr"><span class="hs-identifier hs-type">UnwindExpr</span></a></span><span>
</span><span id="line-510"></span><span>                </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681028951"><span id="local-6989586621681028967"><span class="annot"><span class="annottext">UnwindExpr -&gt; UnwindExpr -&gt; Bool
(UnwindExpr -&gt; UnwindExpr -&gt; Bool)
-&gt; (UnwindExpr -&gt; UnwindExpr -&gt; Bool) -&gt; Eq UnwindExpr
forall a. (a -&gt; a -&gt; Bool) -&gt; (a -&gt; a -&gt; Bool) -&gt; Eq a
/= :: UnwindExpr -&gt; UnwindExpr -&gt; Bool
$c/= :: UnwindExpr -&gt; UnwindExpr -&gt; Bool
== :: UnwindExpr -&gt; UnwindExpr -&gt; Bool
$c== :: UnwindExpr -&gt; UnwindExpr -&gt; Bool
</span><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Eq</span></span></span></span><span class="hs-special">)</span><span>
</span><span id="line-511"></span><span>
</span><span id="line-512"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621681028948"><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#UnwindExpr"><span class="hs-identifier hs-type">UnwindExpr</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-513"></span><span>  </span><span id="local-6989586621681028915"><span class="annot"><span class="annottext">pprPrec :: Rational -&gt; UnwindExpr -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#pprPrec"><span class="hs-identifier hs-var hs-var hs-var hs-var">pprPrec</span></a></span></span><span> </span><span class="annot"><span class="annottext">Rational
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#UwConst"><span class="hs-identifier hs-type">UwConst</span></a></span><span> </span><span id="local-6989586621681028913"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681028913"><span class="hs-identifier hs-var">i</span></a></span></span><span class="hs-special">)</span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681028913"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-514"></span><span>  </span><span class="annot"><a href="GHC.Utils.Outputable.html#pprPrec"><span class="hs-identifier hs-var">pprPrec</span></a></span><span> </span><span class="annot"><span class="annottext">Rational
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#UwReg"><span class="hs-identifier hs-type">UwReg</span></a></span><span> </span><span id="local-6989586621681028912"><span class="annot"><span class="annottext">GlobalReg
</span><a href="#local-6989586621681028912"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-special">)</span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GlobalReg -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">GlobalReg
</span><a href="#local-6989586621681028912"><span class="hs-identifier hs-var">g</span></a></span><span>
</span><span id="line-515"></span><span>  </span><span class="annot"><a href="GHC.Utils.Outputable.html#pprPrec"><span class="hs-identifier hs-var">pprPrec</span></a></span><span> </span><span id="local-6989586621681028911"><span class="annot"><span class="annottext">Rational
</span><a href="#local-6989586621681028911"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#UwReg"><span class="hs-identifier hs-type">UwReg</span></a></span><span> </span><span id="local-6989586621681028910"><span class="annot"><span class="annottext">GlobalReg
</span><a href="#local-6989586621681028910"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span id="local-6989586621681028909"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681028909"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Rational -&gt; UnwindExpr -&gt; SDoc
forall a. Outputable a =&gt; Rational -&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#pprPrec"><span class="hs-identifier hs-var">pprPrec</span></a></span><span> </span><span class="annot"><span class="annottext">Rational
</span><a href="#local-6989586621681028911"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">UnwindExpr -&gt; UnwindExpr -&gt; UnwindExpr
</span><a href="GHC.Cmm.DebugBlock.html#UwPlus"><span class="hs-identifier hs-var">UwPlus</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">GlobalReg -&gt; Int -&gt; UnwindExpr
</span><a href="GHC.Cmm.DebugBlock.html#UwReg"><span class="hs-identifier hs-var">UwReg</span></a></span><span> </span><span class="annot"><span class="annottext">GlobalReg
</span><a href="#local-6989586621681028910"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; UnwindExpr
</span><a href="GHC.Cmm.DebugBlock.html#UwConst"><span class="hs-identifier hs-var">UwConst</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681028909"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-516"></span><span>  </span><span class="annot"><a href="GHC.Utils.Outputable.html#pprPrec"><span class="hs-identifier hs-var">pprPrec</span></a></span><span> </span><span class="annot"><span class="annottext">Rational
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#UwDeref"><span class="hs-identifier hs-type">UwDeref</span></a></span><span> </span><span id="local-6989586621681028908"><span class="annot"><span class="annottext">UnwindExpr
</span><a href="#local-6989586621681028908"><span class="hs-identifier hs-var">e</span></a></span></span><span class="hs-special">)</span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#char"><span class="hs-identifier hs-var">char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'*'</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Rational -&gt; UnwindExpr -&gt; SDoc
forall a. Outputable a =&gt; Rational -&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#pprPrec"><span class="hs-identifier hs-var">pprPrec</span></a></span><span> </span><span class="annot"><span class="annottext">Rational
</span><span class="hs-number">3</span></span><span> </span><span class="annot"><span class="annottext">UnwindExpr
</span><a href="#local-6989586621681028908"><span class="hs-identifier hs-var">e</span></a></span><span>
</span><span id="line-517"></span><span>  </span><span class="annot"><a href="GHC.Utils.Outputable.html#pprPrec"><span class="hs-identifier hs-var">pprPrec</span></a></span><span> </span><span class="annot"><span class="annottext">Rational
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#UwLabel"><span class="hs-identifier hs-type">UwLabel</span></a></span><span> </span><span id="local-6989586621681028907"><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681028907"><span class="hs-identifier hs-var">l</span></a></span></span><span class="hs-special">)</span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Rational -&gt; CLabel -&gt; SDoc
forall a. Outputable a =&gt; Rational -&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#pprPrec"><span class="hs-identifier hs-var">pprPrec</span></a></span><span> </span><span class="annot"><span class="annottext">Rational
</span><span class="hs-number">3</span></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681028907"><span class="hs-identifier hs-var">l</span></a></span><span>
</span><span id="line-518"></span><span>  </span><span class="annot"><a href="GHC.Utils.Outputable.html#pprPrec"><span class="hs-identifier hs-var">pprPrec</span></a></span><span> </span><span id="local-6989586621681028906"><span class="annot"><span class="annottext">Rational
</span><a href="#local-6989586621681028906"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#UwPlus"><span class="hs-identifier hs-type">UwPlus</span></a></span><span> </span><span id="local-6989586621681028905"><span class="annot"><span class="annottext">UnwindExpr
</span><a href="#local-6989586621681028905"><span class="hs-identifier hs-var">e0</span></a></span></span><span> </span><span id="local-6989586621681028904"><span class="annot"><span class="annottext">UnwindExpr
</span><a href="#local-6989586621681028904"><span class="hs-identifier hs-var">e1</span></a></span></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Rational
</span><a href="#local-6989586621681028906"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">Rational -&gt; Rational -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&lt;=</span></span><span> </span><span class="annot"><span class="annottext">Rational
</span><span class="hs-number">0</span></span><span>
</span><span id="line-519"></span><span>                            </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Rational -&gt; UnwindExpr -&gt; SDoc
forall a. Outputable a =&gt; Rational -&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#pprPrec"><span class="hs-identifier hs-var">pprPrec</span></a></span><span> </span><span class="annot"><span class="annottext">Rational
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">UnwindExpr
</span><a href="#local-6989586621681028905"><span class="hs-identifier hs-var">e0</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#char"><span class="hs-identifier hs-var">char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'+'</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Rational -&gt; UnwindExpr -&gt; SDoc
forall a. Outputable a =&gt; Rational -&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#pprPrec"><span class="hs-identifier hs-var">pprPrec</span></a></span><span> </span><span class="annot"><span class="annottext">Rational
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">UnwindExpr
</span><a href="#local-6989586621681028904"><span class="hs-identifier hs-var">e1</span></a></span><span>
</span><span id="line-520"></span><span>  </span><span class="annot"><a href="GHC.Utils.Outputable.html#pprPrec"><span class="hs-identifier hs-var">pprPrec</span></a></span><span> </span><span id="local-6989586621681028902"><span class="annot"><span class="annottext">Rational
</span><a href="#local-6989586621681028902"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#UwMinus"><span class="hs-identifier hs-type">UwMinus</span></a></span><span> </span><span id="local-6989586621681028901"><span class="annot"><span class="annottext">UnwindExpr
</span><a href="#local-6989586621681028901"><span class="hs-identifier hs-var">e0</span></a></span></span><span> </span><span id="local-6989586621681028900"><span class="annot"><span class="annottext">UnwindExpr
</span><a href="#local-6989586621681028900"><span class="hs-identifier hs-var">e1</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Rational
</span><a href="#local-6989586621681028902"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">Rational -&gt; Rational -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&lt;=</span></span><span> </span><span class="annot"><span class="annottext">Rational
</span><span class="hs-number">0</span></span><span>
</span><span id="line-521"></span><span>                            </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Rational -&gt; UnwindExpr -&gt; SDoc
forall a. Outputable a =&gt; Rational -&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#pprPrec"><span class="hs-identifier hs-var">pprPrec</span></a></span><span> </span><span class="annot"><span class="annottext">Rational
</span><span class="hs-number">1</span></span><span> </span><span class="annot"><span class="annottext">UnwindExpr
</span><a href="#local-6989586621681028901"><span class="hs-identifier hs-var">e0</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#char"><span class="hs-identifier hs-var">char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'-'</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Rational -&gt; UnwindExpr -&gt; SDoc
forall a. Outputable a =&gt; Rational -&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#pprPrec"><span class="hs-identifier hs-var">pprPrec</span></a></span><span> </span><span class="annot"><span class="annottext">Rational
</span><span class="hs-number">1</span></span><span> </span><span class="annot"><span class="annottext">UnwindExpr
</span><a href="#local-6989586621681028900"><span class="hs-identifier hs-var">e1</span></a></span><span>
</span><span id="line-522"></span><span>  </span><span class="annot"><a href="GHC.Utils.Outputable.html#pprPrec"><span class="hs-identifier hs-var">pprPrec</span></a></span><span> </span><span id="local-6989586621681028899"><span class="annot"><span class="annottext">Rational
</span><a href="#local-6989586621681028899"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#UwTimes"><span class="hs-identifier hs-type">UwTimes</span></a></span><span> </span><span id="local-6989586621681028898"><span class="annot"><span class="annottext">UnwindExpr
</span><a href="#local-6989586621681028898"><span class="hs-identifier hs-var">e0</span></a></span></span><span> </span><span id="local-6989586621681028897"><span class="annot"><span class="annottext">UnwindExpr
</span><a href="#local-6989586621681028897"><span class="hs-identifier hs-var">e1</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Rational
</span><a href="#local-6989586621681028899"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">Rational -&gt; Rational -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&lt;=</span></span><span> </span><span class="annot"><span class="annottext">Rational
</span><span class="hs-number">1</span></span><span>
</span><span id="line-523"></span><span>                            </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Rational -&gt; UnwindExpr -&gt; SDoc
forall a. Outputable a =&gt; Rational -&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#pprPrec"><span class="hs-identifier hs-var">pprPrec</span></a></span><span> </span><span class="annot"><span class="annottext">Rational
</span><span class="hs-number">2</span></span><span> </span><span class="annot"><span class="annottext">UnwindExpr
</span><a href="#local-6989586621681028898"><span class="hs-identifier hs-var">e0</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#char"><span class="hs-identifier hs-var">char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'*'</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Rational -&gt; UnwindExpr -&gt; SDoc
forall a. Outputable a =&gt; Rational -&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#pprPrec"><span class="hs-identifier hs-var">pprPrec</span></a></span><span> </span><span class="annot"><span class="annottext">Rational
</span><span class="hs-number">2</span></span><span> </span><span class="annot"><span class="annottext">UnwindExpr
</span><a href="#local-6989586621681028897"><span class="hs-identifier hs-var">e1</span></a></span><span>
</span><span id="line-524"></span><span>  </span><span class="annot"><a href="GHC.Utils.Outputable.html#pprPrec"><span class="hs-identifier hs-var">pprPrec</span></a></span><span> </span><span class="annot"><span class="annottext">Rational
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681028896"><span class="annot"><span class="annottext">UnwindExpr
</span><a href="#local-6989586621681028896"><span class="hs-identifier hs-var">other</span></a></span></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#parens"><span class="hs-identifier hs-var">parens</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Rational -&gt; UnwindExpr -&gt; SDoc
forall a. Outputable a =&gt; Rational -&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#pprPrec"><span class="hs-identifier hs-var">pprPrec</span></a></span><span> </span><span class="annot"><span class="annottext">Rational
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">UnwindExpr
</span><a href="#local-6989586621681028896"><span class="hs-identifier hs-var">other</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-525"></span><span>
</span><span id="line-526"></span><span class="hs-comment">-- | Conversion of Cmm expressions to unwind expressions. We check for</span><span>
</span><span id="line-527"></span><span class="hs-comment">-- unsupported operator usages and simplify the expression as far as</span><span>
</span><span id="line-528"></span><span class="hs-comment">-- possible.</span><span>
</span><span id="line-529"></span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#toUnwindExpr"><span class="hs-identifier hs-type">toUnwindExpr</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmExpr"><span class="hs-identifier hs-type">CmmExpr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#UnwindExpr"><span class="hs-identifier hs-type">UnwindExpr</span></a></span><span>
</span><span id="line-530"></span><span id="toUnwindExpr"><span class="annot"><span class="annottext">toUnwindExpr :: Platform -&gt; CmmExpr -&gt; UnwindExpr
</span><a href="GHC.Cmm.DebugBlock.html#toUnwindExpr"><span class="hs-identifier hs-var hs-var">toUnwindExpr</span></a></span></span><span> </span><span class="annot"><span class="annottext">Platform
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-type">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmInt"><span class="hs-identifier hs-type">CmmInt</span></a></span><span> </span><span id="local-6989586621681028893"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681028893"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; UnwindExpr
</span><a href="GHC.Cmm.DebugBlock.html#UwConst"><span class="hs-identifier hs-var">UwConst</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Int
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681028893"><span class="hs-identifier hs-var">i</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-531"></span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#toUnwindExpr"><span class="hs-identifier hs-var">toUnwindExpr</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-type">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmLabel"><span class="hs-identifier hs-type">CmmLabel</span></a></span><span> </span><span id="local-6989586621681028891"><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681028891"><span class="hs-identifier hs-var">l</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CLabel -&gt; UnwindExpr
</span><a href="GHC.Cmm.DebugBlock.html#UwLabel"><span class="hs-identifier hs-var">UwLabel</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681028891"><span class="hs-identifier hs-var">l</span></a></span><span>
</span><span id="line-532"></span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#toUnwindExpr"><span class="hs-identifier hs-var">toUnwindExpr</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmRegOff"><span class="hs-identifier hs-type">CmmRegOff</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmGlobal"><span class="hs-identifier hs-type">CmmGlobal</span></a></span><span> </span><span id="local-6989586621681028888"><span class="annot"><span class="annottext">GlobalReg
</span><a href="#local-6989586621681028888"><span class="hs-identifier hs-var">g</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621681028887"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681028887"><span class="hs-identifier hs-var">i</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GlobalReg -&gt; Int -&gt; UnwindExpr
</span><a href="GHC.Cmm.DebugBlock.html#UwReg"><span class="hs-identifier hs-var">UwReg</span></a></span><span> </span><span class="annot"><span class="annottext">GlobalReg
</span><a href="#local-6989586621681028888"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681028887"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-533"></span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#toUnwindExpr"><span class="hs-identifier hs-var">toUnwindExpr</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmReg"><span class="hs-identifier hs-type">CmmReg</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmGlobal"><span class="hs-identifier hs-type">CmmGlobal</span></a></span><span> </span><span id="local-6989586621681028885"><span class="annot"><span class="annottext">GlobalReg
</span><a href="#local-6989586621681028885"><span class="hs-identifier hs-var">g</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GlobalReg -&gt; Int -&gt; UnwindExpr
</span><a href="GHC.Cmm.DebugBlock.html#UwReg"><span class="hs-identifier hs-var">UwReg</span></a></span><span> </span><span class="annot"><span class="annottext">GlobalReg
</span><a href="#local-6989586621681028885"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>
</span><span id="line-534"></span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#toUnwindExpr"><span class="hs-identifier hs-var">toUnwindExpr</span></a></span><span> </span><span id="local-6989586621681028884"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681028884"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmLoad"><span class="hs-identifier hs-type">CmmLoad</span></a></span><span> </span><span id="local-6989586621681028882"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681028882"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span class="annot"><span class="annottext">CmmType
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>               </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UnwindExpr -&gt; UnwindExpr
</span><a href="GHC.Cmm.DebugBlock.html#UwDeref"><span class="hs-identifier hs-var">UwDeref</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; CmmExpr -&gt; UnwindExpr
</span><a href="GHC.Cmm.DebugBlock.html#toUnwindExpr"><span class="hs-identifier hs-var">toUnwindExpr</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681028884"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681028882"><span class="hs-identifier hs-var">e</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-535"></span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#toUnwindExpr"><span class="hs-identifier hs-var">toUnwindExpr</span></a></span><span> </span><span id="local-6989586621681028881"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681028881"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span id="local-6989586621681028880"><span class="annot"><span class="annottext">e :: CmmExpr
</span><a href="#local-6989586621681028880"><span class="hs-identifier hs-var">e</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmMachOp"><span class="hs-identifier hs-type">CmmMachOp</span></a></span><span> </span><span id="local-6989586621681028878"><span class="annot"><span class="annottext">MachOp
</span><a href="#local-6989586621681028878"><span class="hs-identifier hs-var">op</span></a></span></span><span> </span><span class="hs-special">[</span><span id="local-6989586621681028877"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681028877"><span class="hs-identifier hs-var">e1</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681028876"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681028876"><span class="hs-identifier hs-var">e2</span></a></span></span><span class="hs-special">]</span><span class="hs-special">)</span><span>   </span><span class="hs-glyph">=</span><span>
</span><span id="line-536"></span><span>  </span><span class="hs-keyword">case</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">MachOp
</span><a href="#local-6989586621681028878"><span class="hs-identifier hs-var">op</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; CmmExpr -&gt; UnwindExpr
</span><a href="GHC.Cmm.DebugBlock.html#toUnwindExpr"><span class="hs-identifier hs-var">toUnwindExpr</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681028881"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681028877"><span class="hs-identifier hs-var">e1</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; CmmExpr -&gt; UnwindExpr
</span><a href="GHC.Cmm.DebugBlock.html#toUnwindExpr"><span class="hs-identifier hs-var">toUnwindExpr</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681028881"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681028876"><span class="hs-identifier hs-var">e2</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-537"></span><span>    </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_Add"><span class="hs-identifier hs-type">MO_Add</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#UwReg"><span class="hs-identifier hs-type">UwReg</span></a></span><span> </span><span id="local-6989586621681028874"><span class="annot"><span class="annottext">GlobalReg
</span><a href="#local-6989586621681028874"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span id="local-6989586621681028873"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681028873"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#UwConst"><span class="hs-identifier hs-type">UwConst</span></a></span><span> </span><span id="local-6989586621681028872"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681028872"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">GlobalReg -&gt; Int -&gt; UnwindExpr
</span><a href="GHC.Cmm.DebugBlock.html#UwReg"><span class="hs-identifier hs-var">UwReg</span></a></span><span> </span><span class="annot"><span class="annottext">GlobalReg
</span><a href="#local-6989586621681028874"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681028873"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681028872"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-538"></span><span>    </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_Sub"><span class="hs-identifier hs-type">MO_Sub</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#UwReg"><span class="hs-identifier hs-type">UwReg</span></a></span><span> </span><span id="local-6989586621681028869"><span class="annot"><span class="annottext">GlobalReg
</span><a href="#local-6989586621681028869"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span id="local-6989586621681028868"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681028868"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#UwConst"><span class="hs-identifier hs-type">UwConst</span></a></span><span> </span><span id="local-6989586621681028867"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681028867"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">GlobalReg -&gt; Int -&gt; UnwindExpr
</span><a href="GHC.Cmm.DebugBlock.html#UwReg"><span class="hs-identifier hs-var">UwReg</span></a></span><span> </span><span class="annot"><span class="annottext">GlobalReg
</span><a href="#local-6989586621681028869"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681028868"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681028867"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-539"></span><span>    </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_Add"><span class="hs-identifier hs-type">MO_Add</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#UwConst"><span class="hs-identifier hs-type">UwConst</span></a></span><span> </span><span id="local-6989586621681028866"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681028866"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#UwReg"><span class="hs-identifier hs-type">UwReg</span></a></span><span> </span><span id="local-6989586621681028865"><span class="annot"><span class="annottext">GlobalReg
</span><a href="#local-6989586621681028865"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span id="local-6989586621681028864"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681028864"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">GlobalReg -&gt; Int -&gt; UnwindExpr
</span><a href="GHC.Cmm.DebugBlock.html#UwReg"><span class="hs-identifier hs-var">UwReg</span></a></span><span> </span><span class="annot"><span class="annottext">GlobalReg
</span><a href="#local-6989586621681028865"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681028866"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681028864"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-540"></span><span>    </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_Add"><span class="hs-identifier hs-type">MO_Add</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#UwConst"><span class="hs-identifier hs-type">UwConst</span></a></span><span> </span><span id="local-6989586621681028863"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681028863"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#UwConst"><span class="hs-identifier hs-type">UwConst</span></a></span><span> </span><span id="local-6989586621681028862"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681028862"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int -&gt; UnwindExpr
</span><a href="GHC.Cmm.DebugBlock.html#UwConst"><span class="hs-identifier hs-var">UwConst</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681028863"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681028862"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-541"></span><span>    </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_Sub"><span class="hs-identifier hs-type">MO_Sub</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#UwConst"><span class="hs-identifier hs-type">UwConst</span></a></span><span> </span><span id="local-6989586621681028861"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681028861"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#UwConst"><span class="hs-identifier hs-type">UwConst</span></a></span><span> </span><span id="local-6989586621681028860"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681028860"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int -&gt; UnwindExpr
</span><a href="GHC.Cmm.DebugBlock.html#UwConst"><span class="hs-identifier hs-var">UwConst</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681028861"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681028860"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-542"></span><span>    </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_Mul"><span class="hs-identifier hs-type">MO_Mul</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#UwConst"><span class="hs-identifier hs-type">UwConst</span></a></span><span> </span><span id="local-6989586621681028858"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681028858"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#UwConst"><span class="hs-identifier hs-type">UwConst</span></a></span><span> </span><span id="local-6989586621681028857"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681028857"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int -&gt; UnwindExpr
</span><a href="GHC.Cmm.DebugBlock.html#UwConst"><span class="hs-identifier hs-var">UwConst</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681028858"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681028857"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-543"></span><span>    </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_Add"><span class="hs-identifier hs-type">MO_Add</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">,</span><span> </span><span id="local-6989586621681028855"><span class="annot"><span class="annottext">UnwindExpr
</span><a href="#local-6989586621681028855"><span class="hs-identifier hs-var">u1</span></a></span></span><span class="hs-special">,</span><span>        </span><span id="local-6989586621681028854"><span class="annot"><span class="annottext">UnwindExpr
</span><a href="#local-6989586621681028854"><span class="hs-identifier hs-var">u2</span></a></span></span><span>       </span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">UnwindExpr -&gt; UnwindExpr -&gt; UnwindExpr
</span><a href="GHC.Cmm.DebugBlock.html#UwPlus"><span class="hs-identifier hs-var">UwPlus</span></a></span><span> </span><span class="annot"><span class="annottext">UnwindExpr
</span><a href="#local-6989586621681028855"><span class="hs-identifier hs-var">u1</span></a></span><span> </span><span class="annot"><span class="annottext">UnwindExpr
</span><a href="#local-6989586621681028854"><span class="hs-identifier hs-var">u2</span></a></span><span>
</span><span id="line-544"></span><span>    </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_Sub"><span class="hs-identifier hs-type">MO_Sub</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">,</span><span> </span><span id="local-6989586621681028853"><span class="annot"><span class="annottext">UnwindExpr
</span><a href="#local-6989586621681028853"><span class="hs-identifier hs-var">u1</span></a></span></span><span class="hs-special">,</span><span>        </span><span id="local-6989586621681028852"><span class="annot"><span class="annottext">UnwindExpr
</span><a href="#local-6989586621681028852"><span class="hs-identifier hs-var">u2</span></a></span></span><span>       </span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">UnwindExpr -&gt; UnwindExpr -&gt; UnwindExpr
</span><a href="GHC.Cmm.DebugBlock.html#UwMinus"><span class="hs-identifier hs-var">UwMinus</span></a></span><span> </span><span class="annot"><span class="annottext">UnwindExpr
</span><a href="#local-6989586621681028853"><span class="hs-identifier hs-var">u1</span></a></span><span> </span><span class="annot"><span class="annottext">UnwindExpr
</span><a href="#local-6989586621681028852"><span class="hs-identifier hs-var">u2</span></a></span><span>
</span><span id="line-545"></span><span>    </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_Mul"><span class="hs-identifier hs-type">MO_Mul</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">,</span><span> </span><span id="local-6989586621681028851"><span class="annot"><span class="annottext">UnwindExpr
</span><a href="#local-6989586621681028851"><span class="hs-identifier hs-var">u1</span></a></span></span><span class="hs-special">,</span><span>        </span><span id="local-6989586621681028850"><span class="annot"><span class="annottext">UnwindExpr
</span><a href="#local-6989586621681028850"><span class="hs-identifier hs-var">u2</span></a></span></span><span>       </span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">UnwindExpr -&gt; UnwindExpr -&gt; UnwindExpr
</span><a href="GHC.Cmm.DebugBlock.html#UwTimes"><span class="hs-identifier hs-var">UwTimes</span></a></span><span> </span><span class="annot"><span class="annottext">UnwindExpr
</span><a href="#local-6989586621681028851"><span class="hs-identifier hs-var">u1</span></a></span><span> </span><span class="annot"><span class="annottext">UnwindExpr
</span><a href="#local-6989586621681028850"><span class="hs-identifier hs-var">u2</span></a></span><span>
</span><span id="line-546"></span><span>    </span><span id="local-6989586621681028849"><span class="annot"><span class="annottext">(MachOp, UnwindExpr, UnwindExpr)
</span><a href="#local-6989586621681028849"><span class="hs-identifier hs-var">_otherwise</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc -&gt; UnwindExpr
forall a. HasCallStack =&gt; String -&gt; SDoc -&gt; a
</span><a href="GHC.Utils.Outputable.html#pprPanic"><span class="hs-identifier hs-var">pprPanic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Unsupported operator in unwind expression!&quot;</span></span><span>
</span><span id="line-547"></span><span>                           </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; CmmExpr -&gt; SDoc
</span><a href="GHC.Cmm.Ppr.Expr.html#pprExpr"><span class="hs-identifier hs-var">pprExpr</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681028881"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681028880"><span class="hs-identifier hs-var">e</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-548"></span><span class="annot"><a href="GHC.Cmm.DebugBlock.html#toUnwindExpr"><span class="hs-identifier hs-var">toUnwindExpr</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681028848"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681028848"><span class="hs-identifier hs-var">e</span></a></span></span><span>
</span><span id="line-549"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc -&gt; UnwindExpr
forall a. HasCallStack =&gt; String -&gt; SDoc -&gt; a
</span><a href="GHC.Utils.Outputable.html#pprPanic"><span class="hs-identifier hs-var">pprPanic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Unsupported unwind expression!&quot;</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CmmExpr -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681028848"><span class="hs-identifier hs-var">e</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-550"></span></pre></body></html>